fix(task): cancel subagent on any abnormal tool exit#12
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesTask cleanup
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ported from upstream anomalyco#36358.
eb1ba2f to
2474be4
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Port of upstream anomalyco/opencode#36358.
The task tool's release handler now cancels the child subagent session on ANY abnormal exit (
Exit.isFailure) instead of only interrupts — previouslyEffect.orDie-converted tool errors left orphaned subagent sessions running after the parent moved on.No overlap with our local runtime subagent model selection changes (different region of task.ts; verified by diff inspection).
Verified:
bun test test/tool/task.test.ts(25 pass) andbun typecheckfrom packages/opencode.Summary by CodeRabbit