Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
- Add raceSignal() utility for clean abort-signal racing - Wrap non-task tool execution with configurable timeout (default 15min) - Add task-level deadline management with timeout recovery - Support experimental.tool_timeout and experimental.task_timeout config - Task tool manages its own deadline, skips outer timeout wrapper
98cf4c1 to
73296e3
Compare
|
Hi @ESRE-dev — I opened #25141 yesterday for the same issue (#15080) without noticing this PR. Apologies for the noise; you got there first and your scope is broader (this PR covers non-task tool timeouts and adds a shared I've drafted #25141. If you'd like a hand getting the failing checks (unit linux/windows + e2e linux/windows) over the line, happy to chip in — let me know. If maintainers prefer the broader patch this PR offers, mine can close. One thing worth surfacing on this thread regardless: @maiterth left a comment on #25141 suggesting that some "subagent hangs" may actually be a deeper-nesting permission-prompt-bubbling failure ( |
Issue for this PR
Closes #15080
Type of change
What does this PR do?
Adds configurable timeout protection for both normal tool execution and subagent task execution to prevent indefinite hangs.
Key changes:
Shared abort utility
raceSignal(...)helper that cleanly races async work against an abort signal.Global non-task tool timeout
experimental.tool_timeout.taskexcluded from this outer timeout so it can manage its own deadline.Task tool deadline management
experimental.task_timeout.task_id.Config schema updates
Related overlap (not duplicates):
How did you verify your code works?
packages/opencode/test/tool/timeout.test.ts.Screenshots / recordings
Not a UI change.
Checklist
If you do not follow this template your PR will be automatically rejected.