anomalyco / anomalyco/opencode
Ghost sub-agent delegations stuck as 'running' in sidebar after completion/restart
@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:
- Restarting the app
- Killing all opencode processes (kill -9)
- 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
- Launch a sub-agent delegation
- Let it complete or time out
- Restart opencode
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.