Skip to content

Show OpenCode sessions as Waiting for pending approvals - #103

Merged
milanshen merged 2 commits into
cvu/claude-waitfrom
cvu/opencode-wait
Aug 21, 2026
Merged

Show OpenCode sessions as Waiting for pending approvals#103
milanshen merged 2 commits into
cvu/claude-waitfrom
cvu/opencode-wait

Conversation

@calvintvu

@calvintvu calvintvu commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Context

OpenCode keeps pending permission requests in memory. It does not store this state in the transcript database. The default TUI does not expose its permission API to other processes. Therefore, the collector cannot distinguish a permission wait from an ordinary running tool. The plugin sends the permission lifecycle to coSlash.

Changes

  • Install a global OpenCode event plugin when coSlash starts. The global plugin also covers manually launched OpenCode sessions.
  • Record only request IDs, session IDs, and process IDs. Do not record prompts, tool arguments, or decisions.
  • Mark root sessions as Waiting for pending child or root approvals. Clear the state after a reply and ignore records from stopped processes.

Test

  • go build ./... — passed
  • node --check internal/vendors/opencode/coslash-waiting.js — passed
  • git diff --check cvu/claude-wait...HEAD — passed
  • Manual: pending approval showed Waiting; rejection returned the session to Busy.

Screenshots

  • Session board — OpenCode session shows Waiting during a pending approval.
Screenshot 2026-08-18 at 13 02 14

@calvintvu calvintvu added the bug Something isn't working label Aug 18, 2026
Comment thread collector/internal/vendors/opencode/coslash-waiting.js
Comment thread collector/internal/vendors/opencode/coslash-waiting.js
@calvintvu
calvintvu force-pushed the cvu/opencode-wait branch 3 times, most recently from c9ad715 to f0a22fe Compare August 18, 2026 23:53
@milanshen
milanshen merged commit 49ef9ec into main Aug 21, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants