You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rescue foreground calls can time out before OpenCode finishes large tasks #37
The rescue flow can invoke opencode-companion.mjs task in the foreground. For large tasks, the Claude Code Bash/tool timeout can expire before OpenCode finishes, leaving the result only in background state/logs or losing the user-visible handoff.
This is separate from #13, which tracks a missing wall-clock timeout inside runTrackedJob itself.
Local evidence
plugins/opencode/agents/opencode-rescue.md says:
prefer foreground for small, bounded rescue requests
prefer background for complicated/open-ended work
That guidance relies on the forwarding agent estimating duration correctly. If it chooses foreground for a task that exceeds the host Bash timeout, the command may terminate before output is delivered to the parent conversation.
Expected behavior
Large rescue work should reliably return either:
final output within the foreground timeout, or
a job id immediately with clear instructions to use /opencode:status and /opencode:result.
Suggested fix
Options:
Prefer opencode-companion task --background for any rescue request that may exceed the Bash timeout.
Add a companion-level mode that starts asynchronously and returns a job id immediately, rather than relying on Claude-side run_in_background behavior.
Teach /opencode:rescue to inspect task size/risk and choose async mode more conservatively.
Include the job id in all timeout/failure paths when a worker was started.
Activity
JohnnyVicious commentedon Apr 12, 2026
Consolidated into #17. Foreground timeout behavior should be handled by the same rescue forwarding/backgrounding contract.
fix(rescue): inline forwarding into the slash command (closes #17)
fix(rescue): inline forwarding into the slash command (closes #17) (#58)