S14-02 - User Configuration
Purpose: Which of the user’s Claude Code configuration wb reads
at session start, and how it treats symbolic links in it.
Design
Section titled “Design”At each session start, wb filters and scans an allowlist of the
user’s ~/.claude/. It copies the result into the project user’s
home.
wb-hostd can read only its state directories
(S04-03-self-sandboxingS04-03-self-sandboxing: Self-SandboxingHow each host daemon confines itself at startup, and the wb-launcher that starts confined programs on macOS., “Each host daemon is self-sandboxed”). So
wb, which runs as the user, reads the files.
The files can come from a repository the user merged the guest’s work
into. So wb treats them as untrusted input. Its settings and front
matter parsers have fuzz targets.
Config root
Section titled “Config root”The config root is ~/.claude/, or CLAUDE_CONFIG_DIR when the
user’s environment sets it.
Entries
Section titled “Entries”wb reads these entries of the config root:
CLAUDE.mdandsettings.json;- the directories
agents/,skills/andcommands/.
It never reads:
.claude.json, in the home or inCLAUDE_CONFIG_DIR. It holds the sign-in session and the MCP server definitions.plugins/,hooks/,projects/andoutput-styles/;- history, and everything else in the config root.
Symbolic links
Section titled “Symbolic links”These rules serve SEC02-no-host-fs-shareSEC02-no-host-fs-share: No host filesystem sharingNo host directory is mounted into the guest, read-only or otherwise..
- Each entry once.
wbresolves each entry’s path once, following links, to get that entry’s root. So askillsdirectory linked into a repository works, as it does for Claude Code on the host. - Inside a root. A link whose target resolves outside its root is
skipped with the rule
claude-config-link-outside.wbdoesn’t read the target. - Never
.claude.json. A root or a link that resolves to.claude.jsonin the home or inCLAUDE_CONFIG_DIRis skipped unread, with the ruleclaude-config-link-claude-json. - Other file types. Anything other than a regular file, a directory, or a link is skipped. A link loop is skipped.
- Hidden entries. Inside a root,
wbskips each entry whose name starts with., such as.gitor.env, and doesn’t read it. The one exception is.claude-plugin/, which skips its whole unit (S14-03-configuration-filterS14-03-configuration-filter: Configuration FilterThe units, bounds, filters and secret scan that the user's configuration passes, and how wb-guestd writes the copy in the guest., “Plugin and hook files”).
Roots wb refuses
Section titled “Roots wb refuses”A root is skipped unread, with the rule claude-config-root-refused,
when its resolved path:
- is the home directory or one of its ancestors;
- has a component outside the config root that starts with
., such as~/.sshor~/.config/gh; - lies under the platform’s user data directory:
~/Libraryon macOS,%APPDATA%and%LOCALAPPDATA%on Windows.
Those hold credentials and application data, not Claude Code configuration.
Why this differs from S08
Section titled “Why this differs from S08”The working tree carry-in sends a link as a link, and never reads its target (S08-01-into-the-guestS08-01-into-the-guest: Into the GuestHow the project's code reaches the guest: the clone, its transport, its remotes, and the uncommitted changes carried in at session start., “Carry-in scan”). The guest gets the same repository there, and needs only the link.
A configuration entry is useless as a dangling link in the guest. And
users link these entries on purpose. So wb follows the one link the
user made at the top, and no link below it that leaves the root.
Residual
Section titled “Residual”Inside a root, a link to another file of the same root is followed.
The root can be in a repository the user merged the guest’s work into.
A link the agent committed there can name a file of that repository
the guest never got, such as an ignored .env. Only the secret scan
stands between that file and the guest (T20-config-root-linksT20-config-root-links: Links inside a configuration rootwb resolves each allowlisted entry of the user's ~/.claude/ once, following links, to get its root.).
Decisions
Section titled “Decisions”Copy a filtered allowlist of ~/.claude/
Section titled “Copy a filtered allowlist of ~/.claude/”wb copies a filtered and scanned allowlist of the user’s
~/.claude/ at each session start.
- Rejected: an empty configuration per project. It makes
wb claudeunlikeclaude(FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args].). - Rejected: a copy of
~/.claude/and~/.claude.jsonas they are. It puts the sign-in session and MCP server tokens in the guest (SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential.). - Decided: I45I45 (closed): S14 (new): Claude Code in the guest and the agent interface (V1-02-claude-only)No spec says how Claude Code itself runs in the guest., row 3, option A.
The rules for symbolic links
Section titled “The rules for symbolic links”wb follows the link the user made at the top of an entry, and no
link below it that leaves the root.
- Decided: I45I45 (closed): S14 (new): Claude Code in the guest and the agent interface (V1-02-claude-only)No spec says how Claude Code itself runs in the guest., on 2026-10-12.
Status: Draft