Skip to content

Bash tool: timeout-killed processes not detected as completed; user must manually abort #28654

@void0x14

Description

@void0x14

Bug

Opencode bash tool does not detect process completion when the command spawns long-lived child processes that outlive the parent.

Observed Behavior

Running timeout 60 sudo ./zig-out/bin/siege_engine enp37s0 via Opencode bash tool — siege_engine is killed by timeout after 60s (exit 124) but Opencode never returns control. The tool stays in "running" state until user presses ESC, which logs error=Aborted process.

Session log (2026-05-21T130902.log):

13:10:07  pattern=timeout 60 sudo ... siege_engine enp37s0
13:11:06  type=message.part.updated publishing
[GAP — 6+ minutes, no completion detected]
13:17:27  session.prompt cancel
13:17:27  error=Aborted process

Child processes that outlive siege_engine:

  • Chrome: 18 processes (browser, crashpad, zygote, GPU, network, storage, renderer, audio)
  • nanodet_live: 2 instances (vision inference sidecar)
  • 1 zombie cat process

Output: 148KB (2005 lines), truncated at 51200 bytes / 2000 lines. Full output saved to tool-output file.

Expected

Bash tool should detect when the wrapped command exits and return control, regardless of orphan child processes or output volume.

Environment

  • Opencode: 1.15.6
  • OS: CachyOS
  • Bash tool uses: /usr/bin/zsh -c

Evidence

All files: https://gist.github.com/void0x14/2ceb0c93452abbfbb44d167b7cefb12c

  • evidence-summary.txt — Timeline
  • log-excerpt.txt — Log lines
  • process-tree.txt — pstree (opencode + orphans)
  • tool_e4ab26763001RP9MpQfR3ULKP8 — Truncated output (148KB)
  • screenshot-*.jpg.b64 — Visual evidence (base64 -d file.b64 > file.jpg)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions