Classify every comment as tautology, stale, excuse or decision record. Tautology/stale/excuse comments are deleted (excuses filed as issues #196-#236), decisions moved to docs/adr/0001-0034. - scripts/lint-comments.sh + .comment-baseline: per-file comment count may only go down; wired into tests/all.sh - .claude/skills/delete-comment: repeatable audit workflow - cargo fmt applied to touched crates Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
18 lines
1.2 KiB
Markdown
18 lines
1.2 KiB
Markdown
# Running the claude CLI under hx
|
|
|
|
Status: accepted
|
|
|
|
## Context
|
|
`claude` keeps its own tools while hx supplies MCP servers through `hx mcp-serve`. Claude starts that child and hides its stderr; inside the sandbox claude needs its binary dir, config, network, and on macOS the login keychain (else "Not logged in").
|
|
|
|
## Decision
|
|
- Leaving the sandbox for claude requires an explicit stored rule (`claude:unsandboxed` in `.hx/allow.json`), is never asked for and never implied by yolo: yolo is only safe because claude's tools stay confined.
|
|
- hx's MCP servers are given to claude directly, or only through `codemode` when enabled; claude sees only `hx mcp-serve` tools. A server entry that is hx itself is skipped to avoid recursive spawning. Codemode-run tools ask hx for permission like any other.
|
|
- Sandbox profile includes claude's resolved install dir (versions/..) and the macOS keychain.
|
|
- mcp-serve startup failures are also written to `$TMPDIR/hx-mcp-serve.log`, since the only visible symptom is "mcp__hx__approve not found".
|
|
|
|
## Consequences
|
|
Sandbox escape is auditable; failures are diagnosable via the log.
|
|
|
|
Code: crates/hx-cli/src/main.rs (claude unsandboxed rule, mcp_serve, claude sandbox spec, CLAUDE_CODEMODE/mcp tool config, mcp-serve log)
|