Skip to content

Comments

fix(happy-app): persist permission mode when changed mid-session#689

Open
davidrimshnick wants to merge 3 commits intoslopus:mainfrom
davidrimshnick:fix/persist-permission-mode-from-session
Open

fix(happy-app): persist permission mode when changed mid-session#689
davidrimshnick wants to merge 3 commits intoslopus:mainfrom
davidrimshnick:fix/persist-permission-mode-from-session

Conversation

@davidrimshnick
Copy link

Summary

  • When changing permission mode during an active session (e.g. switching to YOLO/bypassPermissions), the preference was only saved per-session but not to lastUsedPermissionMode in settings
  • New sessions would default back to default mode instead of remembering the user's last choice
  • The new session wizard already persisted this correctly — the gap was only when changing mode mid-session from SessionView
  • One-line fix: added sync.applySettings({ lastUsedPermissionMode: mode.key }) to updatePermissionMode in SessionView.tsx

Fixes #648

Test plan

  • Added unit tests verifying resolveCurrentOption correctly picks up a saved bypassPermissions preference for new sessions
  • Added unit test verifying fallback to default when lastUsedPermissionMode is null
  • All 9 tests in modelModeOptions.test.ts pass
  • Manual: enable YOLO in an active session, start a new session, verify YOLO is pre-selected

🤖 Generated with Claude Code

davidrimshnick and others added 3 commits February 21, 2026 11:14
… crash

@modelcontextprotocol/sdk 1.26.0 added a guard that throws when a
stateless StreamableHTTPServerTransport is reused across requests.
The Happy MCP server was creating a single transport at startup and
reusing it, causing HTTP 500 on every request after the first.

Create a fresh McpServer + transport per request, following the SDK's
own simpleStatelessStreamableHttp.ts example.

Fixes slopus#634

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies that the Happy MCP server handles multiple sequential
requests without returning HTTP 500 — the core regression from
@modelcontextprotocol/sdk >= 1.26.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When changing permission mode during an active session (e.g. enabling
YOLO/bypassPermissions), the preference was only saved per-session but
not to lastUsedPermissionMode in settings. This meant new sessions
would not remember the user's preferred mode.

Now calls sync.applySettings() to persist the preference, matching the
behavior already present in the new session wizard.

Fixes slopus#648

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YOLO preference not persisted across new sessions

1 participant