feat: include subagent in task_metadata when resuming sessions#1798
Merged
code-yeongyu merged 1 commit intodevfrom Feb 12, 2026
Merged
feat: include subagent in task_metadata when resuming sessions#1798code-yeongyu merged 1 commit intodevfrom
code-yeongyu merged 1 commit intodevfrom
Conversation
When delegate-task resumes a session via session_id, the response task_metadata now includes a subagent field identifying which agent was running in the resumed session. This allows the parent agent to know what type of subagent it is continuing. - sync-continuation: uses resumeAgent extracted from session messages - background-continuation: uses task.agent from BackgroundTask object - Gracefully omits subagent when agent info is unavailable
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Minimal additive changes (2 lines) adding optional subagent metadata to task output. Well-tested with 207 lines of new tests covering both presence and absence cases. No logic modifications, purely UI
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
subagentfield in<task_metadata>when resuming sessions viasession_idin the delegate-task toolProblem
When
delegate-taskresumes a session usingsession_id, the returned<task_metadata>block only containedsession_id. The parent orchestrator (Sisyphus) had no structured way to know which agent type (oracle, explore, librarian, etc.) was being continued.Changes
sync-continuation.tssubagent: {resumeAgent}totask_metadata(uses agent extracted from session message history)background-continuation.tssubagent: {task.agent}totask_metadata(uses agent from BackgroundTask object)sync-continuation.test.tsbackground-continuation.test.tsExample Output (Before → After)
Before:
After:
Testing
Summary by cubic
Adds the subagent to <task_metadata> when resuming a session via session_id so the parent orchestrator can see which subagent is being continued without parsing text.
Written for commit 95aa759. Summary will update on new commits.