anomalyco / anomalyco/opencode

Ghost sub-agent delegations stuck as 'running' in sidebar after completion/restart

Open
#40,193 1 comment 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 2, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Background sub-agent delegations that complete (or time out) continue to appear as "running" in the sidebar TUI even after:

  1. Restarting the app
  2. Killing all opencode processes (kill -9)
  3. Full macOS restart

The ghost entries are stuck in the "running" state indefinitely. Observed with jd-judge-* delegations that completed with "no assistant response" but stayed as "running" for hours.

Reproduction

  1. Launch a sub-agent delegation
  2. Let it complete or time out
  3. Restart opencode
  4. Delegation reappears as "running" in the sidebar (stale state)

Expected Behavior

Completed/timeout delegations should be removed from the sidebar after restart, or show their actual terminal state.

Suggested Enhancement: Manual Delegation Dismissal

Since the sidebar already supports mouse interaction (clicking on delegations, switching between them), add the ability for the user to manually close/dismiss a delegation entry from the sidebar. This would serve as both a workaround for stuck ghost entries and a general UX improvement.

Options:

  • Right-click context menu on a delegation → "Close" / "Dismiss"
  • Hover + (X) button on each delegation row
  • Keyboard shortcut on selected delegation (e.g. Ctrl+W or Delete)

Environment

  • Opencode 1.18.11 (Homebrew)
  • macOS Apple Silicon
  • Plugin: opencode-subagent-statusline v1.2.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.