From bca0b013f6b26e517db4df8d487c0858de0220d9 Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 2 Oct 2026 23:52:10 +0000 Subject: [PATCH] constants: foreground-dispatch note in current-state terms at normal volume (s03 M8) Keeps every constraint (explicit run_in_background: false, Agent tool only, never inline or as a Skill, fallback only after a dispatched subagent fails) and the reason (fresh-context isolation); drops 'no longer', BACKGROUND/ONLY/ WRONG/FALLBACK caps. test/ship-control-flow.test.ts and run-in-background-guidance.test.ts check the placeholder and the explicit flag, not this prose. expected red until the regeneration commit --- scripts/resolvers/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/resolvers/constants.ts b/scripts/resolvers/constants.ts index 48de322a4..300536810 100644 --- a/scripts/resolvers/constants.ts +++ b/scripts/resolvers/constants.ts @@ -169,4 +169,4 @@ Branch on the echoed \`CODEX_MODE\`: export const CC_BACKGROUND_DEFAULT_SINCE = 'Claude Code v2.1.198'; export const FOREGROUND_DISPATCH_NOTE = - `**Foreground required:** pass \`run_in_background: false\` on the Agent call — subagents run in the BACKGROUND by default since ${CC_BACKGROUND_DEFAULT_SINCE}. (Merely omitting the flag no longer produces a foreground run; it must be explicitly false.) The dispatch happens ONLY via the Agent tool: invoking the target as a Skill, or executing its workflow inline in your own context, is WRONG even though the skill may appear in your available-skills list — inline execution forfeits the fresh-context isolation this dispatch exists for, and the explicit flag already makes the Agent call block. (Where a step defines an inline FALLBACK, it applies only after a dispatched subagent has failed.)`; + `**Foreground required:** pass \`run_in_background: false\` on the Agent call — subagents run in the background by default since ${CC_BACKGROUND_DEFAULT_SINCE}, so omitting the flag gives a background run. Dispatch through the Agent tool only: invoking the target as a Skill, or executing its workflow inline in your own context, forfeits the fresh-context isolation this dispatch exists for, even though the skill may appear in your available-skills list; the explicit flag already makes the Agent call block. (Where a step defines an inline fallback, it applies only after a dispatched subagent has failed.)`;