Fix server death under Claude Desktop: cwd-independent approot and audit#7
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.--approot ${HOME}/.stackql(plain arg; on Windows ${HOME} expands with backslashes which are invalid inside JSON) +--mcp.config {"server": {"audit": {"disabled": true}}}(static JSON)${__dirname}/${HOME}to temp dirs) so manifest regressions fail CI instead of surfacing in DesktopVerified locally: rebuilt bundles, smoke test passes with manifest-driven args (provider pull lands in the hermetic approot, no cwd writes).
?? Generated with Claude Code