Skip to content

fix(opencode): attribute task child agent on creation#30786

Merged
rekram1-node merged 1 commit into
devfrom
fix/task-child-agent-attribution
Jun 4, 2026
Merged

fix(opencode): attribute task child agent on creation#30786
rekram1-node merged 1 commit into
devfrom
fix/task-child-agent-attribution

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • persist the already-resolved subagent name when creating a Task-tool child session
  • cover eager child-session agent attribution in the existing Task-tool test

Why

Task-tool child sessions are created after the requested subagent has already been resolved. Passing agent: next.name at creation time avoids a temporary unattributed child row and prevents the row from remaining unattributed if execution stops before prompt admission.

This intentionally keeps the change narrow: prompt-time switching remains authoritative for later changes, and model attribution is unchanged.

Testing

  • bun test test/tool/task.test.ts

@rekram1-node rekram1-node merged commit 730ea6d into dev Jun 4, 2026
10 of 12 checks passed
@rekram1-node rekram1-node deleted the fix/task-child-agent-attribution branch June 4, 2026 18:19
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 5, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant