Skip to content

feat: Codex CLI detection, terminal resize fix, simpler chat init#241

Merged
charlesrhoward merged 1 commit intomainfrom
feat/codex-detection-chat-simplify
Mar 26, 2026
Merged

feat: Codex CLI detection, terminal resize fix, simpler chat init#241
charlesrhoward merged 1 commit intomainfrom
feat/codex-detection-chat-simplify

Conversation

@charlesrhoward
Copy link
Copy Markdown
Contributor

@charlesrhoward charlesrhoward commented Mar 26, 2026

Summary

  • Generalize agent detection to recognize Codex CLI (process name + output patterns) alongside Claude Code — agents now named "Codex 1" instead of "Claude 1"
  • Fix terminal text shrinking/wrapping on tab switch by using double rAF and sending PTY resize IPC when a tab becomes active
  • Simplify WorkspaceHome chat init from a dense 5-section grid to a minimal centered layout with compact starter buttons

Test plan

  • Run Codex CLI in a terminal — verify agent appears as "Codex N"
  • Run Claude Code — verify agent still appears as "Claude N"
  • Switch between terminal tabs — verify text doesn't shrink/wrap
  • Open chat panel — verify clean minimal init with starter buttons

🤖 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.ts now detects both Claude and Codex via process-name and output-pattern matching, tracks the detected agentKind, and emits it with the existing terminal:claude-status event.

Propagates agent kind into the renderer and fixes tab-switch sizing. TerminalTab consumes the new onClaudeStatus signature to name spawned agents Codex N vs Claude N, and adds a double requestAnimationFrame refit plus terminal.resize IPC on tab activation to prevent shrink/wrap.

Simplifies chat workspace landing UI. WorkspaceHome is 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.

…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
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-space-web Ready Ready Preview, Comment Mar 26, 2026 11:27pm

Request Review

@charlesrhoward charlesrhoward enabled auto-merge (squash) March 26, 2026 23:27
@charlesrhoward charlesrhoward merged commit 7b48cdc into main Mar 26, 2026
7 checks passed
@charlesrhoward charlesrhoward deleted the feat/codex-detection-chat-simplify branch March 26, 2026 23:28
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/main/terminal.ts
Comment on lines +164 to +165
if (isAgentRunning !== s.wasAgentRunning) {
s.wasAgentRunning = isAgentRunning
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

@@ -1,5 +1,4 @@
import {
BUILT_IN_AUTOMATIONS,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Comment thread src/main/terminal.ts
wasClaudeRunning: boolean
outputClaudeDetected: boolean
wasAgentRunning: boolean
detectedAgentKind: AgentKind
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (2)
Fix in Cursor Fix in Web

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