Expand description
The files a Claude Code session reads by itself at startup, listed for the
“Given to the agent” card
(SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_STARTUP_FILES_2026_09_30.md §4,
phase LC2). Before this the card showed only what the SessionStart hook
carried, while the CLI had also loaded the user’s CLAUDE.md, every
CLAUDE.md up the folder tree (the hand-maintained
~/.agentmux/agents/CLAUDE.md among them), their @imports, the skill
listing and the MCP servers.
This mirrors Claude Code’s documented loading rules: it is what the CLI should have read, not proof that it did.
Structs§
- Startup
File - One startup item.
Enums§
- Owner
- Who writes a file: AgentMux, the user (a file in the agent’s own
workspace that AgentMux doesn’t manage), or someone else (outside the
workspace and not written by AgentMux, e.g. the hand-maintained shared
agents/CLAUDE.md).
Constants§
- MAX_
IMPORT_ 🔒DEPTH - Claude Code follows
@importsthis many hops deep.
Functions§
- add_
instructions 🔒 - claude_
startup_ files - Claude’s startup files for a session in
cwd, in the order the CLI loads them: the user’sCLAUDE.md(inconfig_dir, else~/.claude), then each folder from the filesystem root down tocwd(itsCLAUDE.md,.claude/CLAUDE.md,CLAUDE.local.md), each file followed by what it imports; then the skill listing and the MCP servers ofcwd. - contains 🔒
- display_
name 🔒 ~/x/yfor a path underhome, else the path; forward slashes.- imports_
of 🔒 @pathimports intext, resolved against the importing file’s folder (~/against the home dir), skipping fenced and inline code, which Claude Code doesn’t evaluate. Only files that exist.- mcp_
item 🔒 - The MCP servers in
cwd/.mcp.json, by name only: the file carries the agent’s signing keys, so its text never leaves this function. - owner_
of 🔒 - skills_
item 🔒 - The skill listing Claude Code builds from
.claude/commands/*.mdand.claude/skills/*/SKILL.md: one item with a count, no text (the CLI lists each by name and description).