codex - 💡(How to fix) Fix fork_context:true subagents continue parent-thread work instead of following delegated prompt

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

fork_context: true subagents sometimes fail to treat the new delegated prompt as the active task. Instead, they appear to inherit the parent thread's active role/work and continue it as if they are the main thread, even when the prompt explicitly says they are the delegated subagent.

This is very disruptive for workflows that use a main/control thread to delegate bounded work to subagents. The subagent should use inherited context as background, but it must understand that the new prompt is the active instruction and that it is the subagent, not the parent thread.

Root Cause

For multi-agent workflows, fork_context: true is useful because the worker benefits from strategic/background context. But if the inherited context is not clearly separated from the active delegated prompt, the worker becomes unreliable and can take the wrong role.

The workaround is to add very explicit boundary text to every forked subagent prompt, e.g. “You are already the delegated X agent; you are not the main/control agent; inherited context is reference only.” That helps, but it should not need to be repeated so heavily by users.

Fix Action

Fix / Workaround

The workaround is to add very explicit boundary text to every forked subagent prompt, e.g. “You are already the delegated X agent; you are not the main/control agent; inherited context is reference only.” That helps, but it should not need to be repeated so heavily by users.

RAW_BUFFERClick to expand / collapse

Feedback ID: 019e21d3-c7c2-7333-8929-fe9761584515

Summary

fork_context: true subagents sometimes fail to treat the new delegated prompt as the active task. Instead, they appear to inherit the parent thread's active role/work and continue it as if they are the main thread, even when the prompt explicitly says they are the delegated subagent.

This is very disruptive for workflows that use a main/control thread to delegate bounded work to subagents. The subagent should use inherited context as background, but it must understand that the new prompt is the active instruction and that it is the subagent, not the parent thread.

Expected behavior

When a subagent is spawned with fork_context: true:

  • It can use inherited conversation context as reference/background.
  • It treats the new subagent prompt as the active task boundary.
  • It understands that it is the delegated worker/reviewer/planner/etc.
  • It does not continue old parent-thread requests such as “spawn a subagent”, “continue the previous task”, or “act as the main/control thread”.

Actual behavior

The subagent can interpret inherited parent-thread context as still-active instruction. In particular, it may:

  • Think it is the main/control thread rather than the delegated subagent.
  • Try to spawn another subagent instead of doing the delegated work itself.
  • Continue or resume work from the parent thread rather than following the prompt it was just given.

Why this matters

For multi-agent workflows, fork_context: true is useful because the worker benefits from strategic/background context. But if the inherited context is not clearly separated from the active delegated prompt, the worker becomes unreliable and can take the wrong role.

The workaround is to add very explicit boundary text to every forked subagent prompt, e.g. “You are already the delegated X agent; you are not the main/control agent; inherited context is reference only.” That helps, but it should not need to be repeated so heavily by users.

Requested improvement

Please make fork_context: true subagent launches have a stronger built-in task boundary, so the model understands:

  1. inherited context is background/reference;
  2. the new subagent prompt is the active instruction;
  3. the subagent's role is the delegated role in that prompt, not the parent thread's role;
  4. previous parent-thread tool/task requests are not active unless restated in the subagent prompt.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a subagent is spawned with fork_context: true:

  • It can use inherited conversation context as reference/background.
  • It treats the new subagent prompt as the active task boundary.
  • It understands that it is the delegated worker/reviewer/planner/etc.
  • It does not continue old parent-thread requests such as “spawn a subagent”, “continue the previous task”, or “act as the main/control thread”.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix fork_context:true subagents continue parent-thread work instead of following delegated prompt