The system prompt is made once per session (start, compaction, model switch), kept in session_meta and resent byte for byte; it holds no date. What changes mid-session -- the date, a mode the person chose, a plan or memory or instruction file they edited, a personality, MCP instructions that arrived later -- is a <session-note> on the next user message, stored with it. The tool list is fixed for the session: plan_submit is always offered and answers unavailable outside plan mode, the wrap-up keeps the tools and runs no call, a withdrawn tool stays listed and answers its refusal; the first request waits up to mcp_wait_ms for MCP servers. Compaction asks for its summary as the next turn of the same conversation. Cached input tokens are parsed (incl. llama.cpp timings), stored per request and shown in /context. Spec: context.md §7/§10, loop.json context.note (+ plan_ended, plan_own, personal, empty, mcp_wait_ms), modes.json plan.refused, compact.md without the transcript heading. Conformance area prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
36 files changed
+1533
-169
No files matched your search
@@ -63,7 +63,8 @@ describe("subagents", () => {
|
||||
const child = fake!.requests[1]
|
||||
expect(child.messages[0].content).toContain('You are the "explore" subagent')
|
||||
expect(child.messages[0].content).not.toContain("Permission mode: plan")
|
||||
expect(child.messages.at(-1).content).toBe("Find why average is wrong in calc.py")
|
||||
// Its prompt has no date either: its first message says it (harness context.md §10).
|
||||
expect(child.messages.at(-1).content).toMatch(/^Find why average is wrong in calc\.py\n<session-note>\nToday is \d{4}-\d{2}-\d{2}\.\n<\/session-note>$/)
|
||||
// its own job tools for commands it starts, and report for a word to the main agent
|
||||
expect(names(child)).toEqual(["read", "glob", "grep", "list", "bash", "job_output", "job_list", "job_stop", "web_search", "web_fetch", "report"])
|
||||
// the preamble is the spec's text; a subagent is told nothing of plan_write or ask_user
|
||||
|
||||
Reference in new issue
Block a user