feat: Codex CLI detection, terminal resize fix, simpler chat init#241
feat: Codex CLI detection, terminal resize fix, simpler chat init#241charlesrhoward merged 1 commit intomainfrom
Conversation
…plify chat init - Generalize agent detection to support Codex CLI alongside Claude Code via process name and output pattern matching - Send detected agent kind through IPC so agents are named correctly (e.g. "Codex 1" vs "Claude 1") - Fix terminal text shrinking on tab switch by using double rAF and sending PTY resize IPC when tab becomes active - Simplify WorkspaceHome to a minimal centered layout with compact starter buttons instead of the dense 5-section grid
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4eb98d41ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (isAgentRunning !== s.wasAgentRunning) { | ||
| s.wasAgentRunning = isAgentRunning |
There was a problem hiding this comment.
Emit status updates when detected agent kind changes
The polling loop only sends terminal:claude-status when isAgentRunning flips, so a kind correction while the terminal remains active is silently dropped. In practice, startup output can mark one kind first and the process-name poll can later identify another kind; because isAgentRunning stays true, the renderer never receives the corrected kind and keeps the wrong agent identity (for example, continuing to show Claude N for a Codex session). Please also compare the previous and current kind when deciding whether to emit.
Useful? React with 👍 / 👎.
| @@ -1,5 +1,4 @@ | |||
| import { | |||
| BUILT_IN_AUTOMATIONS, | |||
There was a problem hiding this comment.
Interface retains unused props after component simplification
Low Severity
The WorkspaceHomeProps interface still declares recentFolders, recentRuns, onOpenRecentFolder, onForkRun, and onInstallAutomation, but the component no longer destructures or uses any of them. This forces the caller (ChatPanel.tsx) to keep computing and passing unused props — and makes handleForkRun and handleInstallAutomation in that caller effectively dead code, since they exist solely to satisfy this interface. The interface, its unused type imports (BuiltInAutomationId), and the corresponding caller props need to be trimmed to match the simplified component.
| wasClaudeRunning: boolean | ||
| outputClaudeDetected: boolean | ||
| wasAgentRunning: boolean | ||
| detectedAgentKind: AgentKind |
There was a problem hiding this comment.
detectedAgentKind field is written but never read
Low Severity
The new detectedAgentKind field in PtySession is assigned in both the onData handler and the poll timer, but is never read anywhere in the codebase. It's a dead store — the agent kind is already communicated to the renderer via the IPC sendToMainWindow call's agentKind argument. Either this field is unused and can be removed, or an intended consumer is missing.


Summary
Test plan
🤖 Generated with Claude Code
Note
Medium Risk
Updates IPC payloads and terminal agent-detection logic, which could break renderer/main compatibility or mis-detect running agents. UI simplification is low risk but removes several WorkspaceHome actions/sections from the initial view.
Overview
Generalizes terminal “Claude running” detection to multiple agents.
terminal.tsnow detects both Claude and Codex via process-name and output-pattern matching, tracks the detectedagentKind, and emits it with the existingterminal:claude-statusevent.Propagates agent kind into the renderer and fixes tab-switch sizing.
TerminalTabconsumes the newonClaudeStatussignature to name spawned agentsCodex NvsClaude N, and adds a doublerequestAnimationFramerefit plusterminal.resizeIPC on tab activation to prevent shrink/wrap.Simplifies chat workspace landing UI.
WorkspaceHomeis reduced from a multi-section grid (recent runs/repos, automations, fork/install actions) to a centered header, optional “resume last run” button, and compact starter-job buttons.Written by Cursor Bugbot for commit 4eb98d4. This will update automatically on new commits. Configure here.