VSCode Extension: Restored chat sessions ignore defaultMode on workspace reload

Resolved 💬 4 comments Opened Feb 28, 2026 by EarthmanWeb Closed Mar 30, 2026

Bug Description

When the VSCode workspace is reloaded (e.g., Developer: Reload Window), newly created chat sessions correctly apply the defaultMode setting from settings.json, but existing/restored chat sessions from before the reload do not re-apply the configured defaultMode. They revert to the default permission mode instead.

Environment

  • Claude Code VSCode Extension (latest as of 2026-02-28)
  • macOS (Darwin 25.2.0), though likely platform-independent
  • Configuration method: defaultMode set in .claude/settings.json

Steps to Reproduce

  1. Configure defaultMode in .claude/settings.json:

``json
{
"defaultMode": "bypassPermissions"
}
`
(Also reproducible with
acceptEdits, plan, dontAsk` — any non-default mode.)

  1. Open a new Claude Code chat in VSCode — observe it starts in the configured mode (e.g., bypassPermissions). ✅
  2. Reload the VSCode workspace (Developer: Reload Window or close/reopen the window).
  3. The previously open chat session is restored — observe it is now in default mode, not the configured defaultMode. ❌
  4. Open a new chat — observe it correctly starts in the configured mode. ✅

Expected Behavior

Restored chat sessions should re-apply the defaultMode setting from settings.json on workspace reload, matching the behavior of newly created sessions, (or should at least match the setting that was active on each individual chat when the workspace was reloaded).

Actual Behavior

Restored chat sessions revert to default permission mode on workspace reload. Only newly created sessions respect the defaultMode configuration.

Analysis

This suggests the session restoration codepath does not re-read the defaultMode configuration from settings.json. The initialization path for new sessions does read it, but the deserialization/rehydration path for existing sessions either:

  1. Serializes the _current runtime_ permission mode into session state and restores that (which may have been manually changed during the session), or
  2. Skips the defaultMode config read entirely during restoration, falling back to default.

Either way, the defaultMode config should be consulted during session restoration to ensure consistent behavior.

Related Issues

  • #29159 — VSCode extension does not enforce permissions from settings.json
  • #12604 — Permission settings (defaultMode: bypassPermissions) not working
  • #15772 — VSCode Extension ignores all permission settings

This issue is distinct because it specifically identifies the workspace reload / session restoration lifecycle as the failure point, whereas new sessions work correctly.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗