Skip to content

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

Closed as not planned

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)

Activity

  1. github-actions commented on May 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Your issue adds useful detail around the timeout wrapper and large output volume, which may be worth referencing in those issues as additional reproduction cases.

  2. github-actions commented on Jul 21, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions