eca icon indicating copy to clipboard operation
eca copied to clipboard

Add spawned_id to spawn_agent and allow main agent to resume it

Open zikajk opened this issue 9 months ago • 4 comments

Add smething like spawned_id to subagent which will effectively resume the chat that has been created with another subagent in the session. And add something like this into description of the spawn_agent tool: Each agent invocation starts with a fresh context unless you provide spawned_id to resume the same subagent session (which continues with its previous messages and tool outputs). When starting fresh, your prompt should contain a highly detailed task.

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

zikajk avatar Feb 16 '26 08:02 zikajk

@zikajk that sounds weird to me, why/is that common to want to re-use a subagent in another conversation? we would need to pass all spawned subagents summary + id from other chats as context of the tool description as well right? which sounds dangerous as well.

ericdallo avatar Feb 23 '26 12:02 ericdallo

@ericdallo Not common :-). It’s just that scenario where you ask a question that triggers a second sub-agent, and it ends up re-doing the first one's work instead of picking up where it left off. For example—the explorer runs a huge git diff and finds something. Then you ask again about something specific within that diff. If it will be resumed you might save some tokens and time.
The idea comes from this - https://code.claude.com/docs/en/sub-agents#resume-subagents

If we were prioritizing these, I’d give this the lowest points/priority. I found it interesting and didn't want to forget it. I’d use it occasionally, but it should only trigger on explicit request, not automatically.

zikajk avatar Feb 23 '26 12:02 zikajk

Ah so it happens in the same chat, got it. Ok, makes sense, I think we just need to do some testing and make sure the tool description is not affected negatively

ericdallo avatar Feb 23 '26 12:02 ericdallo

Closing this one in favour of discussion here: https://github.com/editor-code-assistant/eca/discussions/440

zikajk avatar May 03 '26 11:05 zikajk