Skip to content

feat: comprehensive CLI status detection for all providers#943

Merged
web3dev1337 merged 3 commits into
mainfrom
fix/sidebar-worktree-status-followup
Mar 20, 2026
Merged

feat: comprehensive CLI status detection for all providers#943
web3dev1337 merged 3 commits into
mainfrom
fix/sidebar-worktree-status-followup

Conversation

@web3dev1337
Copy link
Copy Markdown
Owner

@web3dev1337 web3dev1337 commented Mar 20, 2026

Summary

Comprehensive status detection for all CLI providers by reverse-engineering their real terminal output patterns.

Claude Code (from claude-code-mods)

  • 11 new tool patterns: Agent, WebFetch, WebSearch, NotebookEdit, NotebookRead, Skill, AskUserQuestion, ToolSearch, TodoWrite, TaskOutput, TaskStop
  • New completion patterns: Total duration (wall):, Total code changes:, per-model token usage lines (N input, N output, N cache)
  • New busy patterns: Waiting for permission…, Waiting for task, Running command, compacting conversation

Codex (from binary strings)

  • esc to interrupt / tab to add notes → busy
  • Choose an action / Select provider? → waiting

Gemini CLI (from dist/src JS)

  • Tool confirmations (Apply this change?, Allow execution of, Do you want to proceed?, Ready to start implementation?, Modify Trust Level) → waiting
  • Waiting for verification... → waiting
  • (press tab to focus) → busy

OpenCode (from Go source)

  • Thinking... / Generating... / Working... / Waiting for tool response... / Building tool call... → busy
  • press esc to exit cancel → busy
  • press enter to send the message → waiting

Aider (from Python source)

  • multi> and aider> prompts → waiting
  • Waiting for LLM/model / think tokens → busy

Also in this PR

  • Per-provider busy window timings (Codex 10s, Gemini 6s, OpenCode 5s, Aider 10s)
  • normalizeAgent() and detectProviderStatus() architecture
  • Added gemini to known agents in sessionManager
  • Fixed matchesClaudeTrustPrompt logic
  • 57 unit tests (all passing)

Test plan

  • All 57 unit tests passing
  • node --check server/statusDetector.js passes
  • Manual testing with each CLI in the orchestrator sidebar

🤖 Generated with Claude Code

web3dev1337 and others added 2 commits March 20, 2026 11:21
Add missing status patterns discovered from reverse-engineering installed CLIs:
- Codex: "esc to interrupt" busy indicator, "Choose an action" and "Select provider?" waiting
- Gemini: tool confirmation prompts (Apply this change?, Allow execution, Do you want to proceed?),
  verification flow, press-tab-to-focus busy indicator
- OpenCode: all busy states (Thinking, Generating, Working, Building tool call, Waiting for tool response),
  "press enter to send" waiting, "press esc to exit cancel" busy
- Aider: multi> and aider> prompts, "Waiting for LLM/model" busy indicator

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@web3dev1337 web3dev1337 changed the title fix: improve provider status detection feat: comprehensive CLI status detection for all providers Mar 20, 2026
From reverse-engineering claude-code-mods:
- Tools: Agent, WebFetch, WebSearch, NotebookEdit, NotebookRead, Skill,
  AskUserQuestion, ToolSearch, TodoWrite, TaskOutput, TaskStop
- Completion: Total duration, Total code changes, per-model token usage lines
- Busy: Waiting for permission, Waiting for task, Running command,
  compacting conversation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@web3dev1337 web3dev1337 merged commit 1661ee1 into main Mar 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant