eca
eca copied to clipboard
Support fork_turns for subagent
Add a fork_turns option to allow subagents to inherit the parent conversation context, similar to Codex. Codex defaults to all, but we should probably make this opt-in (none by default).
Support none and all initially, potentially also the last N turns in the future (but I .
Update spawn_agent.md to clarify that subagents don't see the parent conversation history by default.
Interaction with subagent resume (chat_id):
- Apply
fork_turnsonly when creating a new subagent. - Resuming an existing subagent should preserve its own conversation history, without automatically syncing new parent turns.
- If both
chat_idandfork_turnsare explicitly provided, return a validation error rather than silently ignoring one.
Benefits:
- GPT models often assume subagents already know the parent conversation context.
- Potentially benefit from prompt caching when using compatible models and providers, although cache reuse is not guaranteed.
- Avoid redundant searches, file reads, and repeated context retrieval.
- Give subagents better context without manually passing everything in their prompts.
To upvote this issue, give it a thumbs up. See [this list](https://github.com/editor-code-assistant/eca/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) for the most upvoted issues.