Pi: answer Agent Runner forks on the head's account and cache
Draft
AN
14h ago+1582+1582+0123456789012345678901234567890123456789-12-12-01234567890123456789
Forks (options.cortexkitFork = {headSessionId}) take their account from routing only, never move accounts, send a full request whose prefix matches the head's base, report served under the fork session, send no billing report, and leave the head's lease, thread, keep-warm and effort state untouched. Requests without the fork field are unchanged.
Summary by cubic
Pi now serves Agent Runner fork requests (options.cortexkitFork) on the head session's account and prompt cache, without moving accounts or touching head-side leases, threads, keep-warm, or effort state. Non-fork requests keep the existing behavior.
What changes for forks
- Routing alone picks the account; local sticky session-account assignments are bypassed.
- Fork requests replay the retained head base and its effort transitions and skip head leases, threads, keep-warm, and billing reports.
- Fork answers are reported as served under the fork session; upstream failures are reported as failed requests, not account refusals.
- Long fork branches bridge cache markers without exceeding Anthropic's four-breakpoint limit.