[PR #6046] feat(task): implement fire-and-forget TaskTool with background execution #11712

Closed
opened 2026-02-16 18:16:39 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6046

State: closed
Merged: No


Phase 4: Rework TaskTool to schedule background execution (fire-and-forget)

Changes

  • TaskTool now returns immediately after scheduling child session work via SessionRunner
  • Added toolPartID to Tool.Context for post-return metadata updates
  • Parent tool part metadata updated via Session.updatePart() instead of ctx.metadata()
  • Subscribes to SessionRunner lifecycle events for cleanup and status updates

Stack

  • PR1: #5996 feat/async-subagent-1-runner
  • PR2: #6036 feat/async-subagent-2-background
  • PR3: #6041 feat/async-subagent-3-centralize
  • PR4: feat/async-subagent-4-tasktool (this PR)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6046 **State:** closed **Merged:** No --- ## Phase 4: Rework TaskTool to schedule background execution (fire-and-forget) ### Changes - TaskTool now returns immediately after scheduling child session work via SessionRunner - Added `toolPartID` to Tool.Context for post-return metadata updates - Parent tool part metadata updated via `Session.updatePart()` instead of `ctx.metadata()` - Subscribes to SessionRunner lifecycle events for cleanup and status updates ### Stack - PR1: #5996 feat/async-subagent-1-runner - PR2: #6036 feat/async-subagent-2-background - PR3: #6041 feat/async-subagent-3-centralize - **PR4: feat/async-subagent-4-tasktool** (this PR)
yindo added the pull-request label 2026-02-16 18:16:39 -05:00
yindo closed this issue 2026-02-16 18:16:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11712