This repository was archived by the owner on Oct 21, 2026. It is now read-only.
Repository navigation
feat(server): delegate tasks to nested Codex agents - #54
Merged
Merged
Conversation
- Add an MCP tool to run provider tasks in the caller’s working copy - Track delegated threads in the Agents panel and return their results to the parent
- Finalize buffered assistant output before terminal session updates - Keep delegated threads from spawning nested tasks across restarts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agents cannot hand independent tasks to another provider while keeping the work in the caller’s working copy. This limits parallel investigation and makes it difficult to return delegated results to the original thread.
Change
Add a
delegate_taskMCP tool that starts a child thread with a selected provider and model in the caller’s working copy. The parent’s Agents panel tracks the child, and the child’s result is delivered to the parent when its turn is idle. Delegations are recovered after server restarts, and delegated threads cannot delegate further. Document the behavior in the thread sidebar guide.Scope and approval
This adds a focused server capability through the existing MCP toolkit and orchestration services, with a corresponding Agents panel update and user guidance. No approval reference was included in the supplied change details.
Verification
Added focused delegation service tests covering thread creation, result delivery, prevention of nested delegation, provider lookup, status mapping, and recovery after restart. The supplied change details do not include test run results.
Model and harness: Codex, GPT-6.