--- status: open parent: "[[027-pi-subagents-implementation-spec-task]]" blocked-by: - "[[046-pi-subagents-minimal-tracer-bullet-task]]" tags: - ticket/task/afk --- # Implement fork context mode ## Question Add fork context mode so a spawn can give the worker the parent active-branch transcript snapshot and delegated-role wrapper while independent context remains clean by default. ## What to build Implement the second version-one context mode. A forked worker should start from the active branch session snapshot and receive a small delegated-role wrapper with the per-call prompt. Independent workers should remain transcript-clean. Named agents that declare `allowedContexts` should reject disallowed spawn overrides. ## Acceptance criteria - [ ] `fork` serializes the parent session header and active branch entries into a child-startable session. - [ ] The forked worker receives the parent active-branch context plus the delegated request wrapper. - [ ] `independent` workers still do not receive parent transcript context. - [ ] `allowedContexts` rejects disallowed context overrides. - [ ] Tests or manual checks distinguish forked and independent context visibility. ## Implementation Notes Do not summarize, strip tool output, or compact before spawning. Let child Pi handle normal compaction.