Code tab: New Session ignores Local mode when GitHub org is connected

Resolved 💬 4 comments Opened Apr 14, 2026 by OscarMcLennan Closed May 24, 2026

Bug

When a GitHub org is connected via the GitHub Integration connector, clicking New session on the Code tab and selecting Local mode still forces a cloud/GitHub session (creates branches like claude/general-session-*, shows "Allocating sandbox...").

Dispatch → Local works fine. Terminal claude works fine. Only New session → Local is broken. This suggests the issue is specific to the New session flow, not the config.

Steps to reproduce

  1. Connect GitHub Integration connector with an org (e.g. Ys-Housing)
  2. Open the desktop app, go to the Code tab
  3. Click New session
  4. Select a local folder and choose Local mode
  5. Send a message

Expected: Local session starts (same as terminal claude or Dispatch → Local)
Actual: Cloud session starts — "Allocating sandbox...", branch created on the GitHub repo

What we tried

This started during a session where we:

  1. Installed gh CLI (brew install gh) and authenticated (gh auth login)
  2. Connected the GitHub Integration connector in the desktop app (which linked the Ys-Housing org)
  3. Created and pushed code to a repo (Ys-Housing/ys_code)

Before connecting the GitHub Integration connector, the Code tab worked locally with no issues.

Debugging steps taken (none fixed it):

  • Removed CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var from ~/.claude/settings.json — no change (later restored since it was there before)
  • Disconnected GitHub Integration connector — Code tab then shows "You must authenticate with GitHub" / "GitHub access check failed" errors and won't start sessions at all
  • Unchecked the org under GitHub organizations in org settings — no change
  • Toggled off "Code in the web" in org settings — no change
  • Cleared dispatchTrustedCodeWorkspaces in claude_desktop_config.json — no change
  • Added all folders to localAgentModeTrustedFolders in claude_desktop_config.json — no change
  • Restarted the desktop app multiple times — no change
  • Restarted the computer — no change
  • Verified ~/.claude/settings.json is valid JSON with correct values — confirmed OK
  • Verified no .git directories exist on the Google Drive shared folders — confirmed none

Key observation:

  • Dispatch → Local: Works correctly (local session, no sandbox, no branches)
  • Terminal claude: Works correctly
  • Cowork tab: Works correctly
  • New session → Local on Code tab: Always forces cloud/GitHub mode

Since Dispatch, terminal, and Cowork all use the same config files and the same GitHub connector state, the issue appears to be in the New session flow on the Code tab specifically.

Environment

  • macOS Tahoe (Darwin 25.3.0, Apple Silicon)
  • Claude Code desktop app
  • GitHub Integration connector with one org (Ys-Housing) connected
  • CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in ~/.claude/settings.json
  • sidebarMode: code in claude_desktop_config.json

View original on GitHub ↗

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