Claude Code
You connect Claude Code to a mount with stash attach. The next session in that folder
starts with the mount: the steering, a digest of what it holds, and the stash tools.
Before you start
Section titled “Before you start”- A ready mount, and a running daemon.
attachnever starts one. See the Quickstart. claudein theharnesseslist of the mount config:
harnesses = ["claude"]Attach
Section titled “Attach”cd ~/src/checkout-servicestash attach opsclaudeTo create and attach in one step, run stash create ops --config stash.toml --attach.
attach writes these files in the folder:
| File | What Stash adds |
|---|---|
.claude/settings.local.json | The hooks |
CLAUDE.md | The steering block |
.mcp.json | The stash MCP server, also named in enabledMcpjsonServers of .claude/settings.local.json |
A global attach writes ~/.claude/settings.json and ~/.claude/CLAUDE.md, and adds the
server with claude mcp add-json --scope user. If claude is missing, attach prints
the command to run. When CLAUDE_CONFIG_DIR is set, a global attach writes these files,
and .claude.json, in that folder.
Trust the workspace
Section titled “Trust the workspace”Claude Code asks once before it runs a server of .mcp.json. Approve it.
To let the agent save notes with no prompt, add Bash(stash note save:*) and
mcp__stash__save_note to permissions.allow in .claude/settings.local.json. attach
prints them for a mount with [extraction].
Avoid duplicate tools
Section titled “Avoid duplicate tools”When Claude Code also runs one of the mount’s MCP servers itself, the agent sees each tool
twice. attach names each such server. Turn off the Claude Code copy with /mcp, or add
it to disabledMcpjsonServers.
Check it
Section titled “Check it”stash status opsThe Workspaces section lists the folder with [claude]. A mount gets turns only from
the time of the attach.
Next steps
Section titled “Next steps”- Attachment modes: MCP mode or CLI mode, and what the steering and the hooks do.
- Troubleshoot: when the agent has no
stashtools.