feat: comprehensive CLI status detection for all providers#943
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive status detection for all CLI providers by reverse-engineering their real terminal output patterns.
Claude Code (from claude-code-mods)
Total duration (wall):,Total code changes:, per-model token usage lines (N input, N output, N cache)Waiting for permission…,Waiting for task,Running command,compacting conversationCodex (from binary strings)
esc to interrupt/tab to add notes→ busyChoose an action/Select provider?→ waitingGemini CLI (from dist/src JS)
Apply this change?,Allow execution of,Do you want to proceed?,Ready to start implementation?,Modify Trust Level) → waitingWaiting for verification...→ waiting(press tab to focus)→ busyOpenCode (from Go source)
Thinking.../Generating.../Working.../Waiting for tool response.../Building tool call...→ busypress esc to exit cancel→ busypress enter to send the message→ waitingAider (from Python source)
multi>andaider>prompts → waitingWaiting for LLM/model/think tokens→ busyAlso in this PR
normalizeAgent()anddetectProviderStatus()architecturegeminito known agents in sessionManagermatchesClaudeTrustPromptlogicTest plan
node --check server/statusDetector.jspasses🤖 Generated with Claude Code