Skip to content

Fix server death under Claude Desktop: cwd-independent approot and audit#7

Merged
jeffreyaven merged 1 commit into
mainfrom
fix/desktop-cwd-readonly
Jun 12, 2026
Merged

Fix server death under Claude Desktop: cwd-independent approot and audit#7
jeffreyaven merged 1 commit into
mainfrom
fix/desktop-cwd-readonly

Conversation

@jeffreyaven

Copy link
Copy Markdown
Member

Claude Desktop launches extensions with cwd / (read-only on macOS). The stackql audit sink defaults to a cwd file with strict failure mode, so the server exited right after initialize (Server disconnected, observed on macOS install of the published darwin bundle). Default approot (<cwd>/.stackql) would fail the same way on first provider pull.

  • manifest args: --approot ${HOME}/.stackql (plain arg; on Windows ${HOME} expands with backslashes which are invalid inside JSON) + --mcp.config {"server": {"audit": {"disabled": true}}} (static JSON)
  • smoke-test.py now launches the server with the manifest own mcp_config.args (substituting ${__dirname}/${HOME} to temp dirs) so manifest regressions fail CI instead of surfacing in Desktop
  • docs/install.md manual-config example updated with the same flags and why

Verified locally: rebuilt bundles, smoke test passes with manifest-driven args (provider pull lands in the hermetic approot, no cwd writes).

?? Generated with Claude Code

Claude Desktop launches extensions with cwd '/', read-only on macOS.
stackql's audit sink defaults to a file in the cwd with strict failure
mode, so the server exited immediately after initialize ('Server
disconnected'). The default approot (<cwd>/.stackql) would fail the
same way on first provider pull.

- manifest args now pass --approot ${HOME}/.stackql (plain arg - on
  Windows ${HOME} expands with backslashes, invalid inside JSON) and
  --mcp.config '{"server": {"audit": {"disabled": true}}}'
- smoke-test.py now launches the server with the manifest's own
  mcp_config.args (substituting ${__dirname}/${HOME} to temp dirs),
  so manifest regressions fail the gate instead of surfacing in Desktop
- docs/install.md manual-config example gets the same flags with
  explanation (no variable substitution exists in that file)

Found by testing the published darwin bundle in Claude Desktop on
macOS; reproduced root cause against the binary directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeffreyaven jeffreyaven merged commit 94feb10 into main Jun 12, 2026
7 checks passed
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.

1 participant