feat: add Grok as first-class harness#138
Conversation
|
Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
More reviews will be available in 25 minutes and 4 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR adds support for a new agent harness ChangesGrok Harness Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/burn-spawn-hook.ts (1)
84-92:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftGrok is inferred but still coerced to Claude in burn stamping paths.
Line 91 adds
'grok'as an inferred harness, but Grok currently falls through to the unknown-launcher fallback that writes pending stamps asharness: 'claude'. That creates harness misattribution in burn data. The same coercion pattern also exists insrc/main/broker.tschild-lineage stamping logic, so both paths should be aligned in the same change.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/burn-spawn-hook.ts` around lines 84 - 92, The inferHarness function currently recognizes 'grok' but downstream burn-stamp writing still coerces unknown launchers to 'claude', causing misattribution; update the burn-stamping path so it uses the actual inferHarness result (or explicitly maps 'grok' to 'grok') instead of forcing 'claude', and make the same change in the child-lineage stamping logic in src/main/broker.ts so both use the same harness value (ensure you reference inferHarness and the burn-stamp/write-pending-stamp code paths in broker.ts and replace the hardcoded 'claude' fallback with the inferred harness or explicit 'grok' mapping).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/renderer/src/components/proactive/ProactiveAgentEditor.tsx`:
- Around line 90-95: The MODEL_OPTIONS constant in ProactiveAgentEditor.tsx
contains Grok entries that don't match xAI docs; either confirm these internal
aliases are supported or update the grok array to use the documented model IDs
(e.g., replace 'grok-build' with 'grok-build-0.1' and replace
'grok-composer-2.5-fast' with the documented composer ID such as
'grok-composer-0.1' or the correct public identifier); ensure the change is
applied to the MODEL_OPTIONS constant so downstream selection code uses valid
xAI model IDs or documented internal aliases.
---
Outside diff comments:
In `@src/main/burn-spawn-hook.ts`:
- Around line 84-92: The inferHarness function currently recognizes 'grok' but
downstream burn-stamp writing still coerces unknown launchers to 'claude',
causing misattribution; update the burn-stamping path so it uses the actual
inferHarness result (or explicitly maps 'grok' to 'grok') instead of forcing
'claude', and make the same change in the child-lineage stamping logic in
src/main/broker.ts so both use the same harness value (ensure you reference
inferHarness and the burn-stamp/write-pending-stamp code paths in broker.ts and
replace the hardcoded 'claude' fallback with the inferred harness or explicit
'grok' mapping).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 75cea760-5d8c-43f2-8e5e-050b5caffdd3
📒 Files selected for processing (14)
src/main/broker.tssrc/main/burn-spawn-hook.tssrc/main/proactive-agent.bundle.tssrc/main/proactive-agent.tssrc/main/proactive-agent.types.tssrc/renderer/src/components/agents/CloudAgentPicker.tsxsrc/renderer/src/components/common/AgentIcons.tsxsrc/renderer/src/components/common/AgentToolbar.tsxsrc/renderer/src/components/proactive/ProactiveAgentCard.tsxsrc/renderer/src/components/proactive/ProactiveAgentEditor.tsxsrc/renderer/src/components/sidebar/SpawnAgentDialog.tsxsrc/renderer/src/components/terminal/TerminalPane.tsxsrc/renderer/src/lib/spawn-agent.tssrc/shared/types/ipc.ts
There was a problem hiding this comment.
1 issue found across 14 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Reviewed the checked-out PR artifacts, which identify the workspace as PR Changed in the workspace:
Verification passed:
I did not print |
|
Reviewed the checked-out PR artifacts, which identify the workspace as PR Changed in the workspace:
Verification passed:
I did not print |
|
Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI. |
|
✅ pr-reviewer applied fixes — committed and pushed Reviewed and fixed one PR issue: Validation run:
I did not verify remote CI status, mergeability, or GitHub review state from here. |
|
Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI. |
|
Updated the Grok model defaults to documented xAI model IDs:
I validated the burn-stamping review comment against the current checkout and did not change it: Verification passed locally:
Remote status data available through the connector only shows Sources used for model validation: xAI docs for Grok Build 0.1 and Models. |
Wires Grok (xAI) across all harness enumeration points so it has the same unified UI experience as Claude and Codex: type definitions, burn stamping, proactive agent types and editor, cloud agent picker, spawn dialogs, toolbar, icons, and empty-state quick-spawn buttons. Note: Grok is PTY-based — no structured output mode is available yet. Structured rendering (equivalent to Claude stream-json / Codex app-server) is deferred pending xAI shipping a JSON output interface. https://claude.ai/code/session_01KXU1uAUwx3L82TMLnAmU4z
ce98ab4 to
50fcf85
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
What this PR does
GrokIconSVG added toAgentIcons.tsx(xAI X-shape mark)grok-build,grok-composer-2.5-fastWhy Grok is PTY-only (intentional)
Grok runs the
grokCLI in a pseudo-terminal — the same as Codex before its app-server. This is intentional: xAI has not shipped a structured output mode equivalent to Claude's--output-format stream-jsonor Codex's app-server event stream.Grok headless support is tracked in issue #141. Once relay confirms compatibility with Grok's
--output-format streaming-json, Grok can be added to the headless list in #139/#140 and structured rendering can follow the same pattern as Claude/Codex.How this differs from #139/#140
PRs #139 and #140 move Claude, Codex, and OpenCode off PTY onto relay's headless transport (no PTY process created). Grok stays PTY here because there is no structured output alternative available from xAI yet.
Deferred
y/n?prompts and render as Pear dialog cardsGenerated by Claude Code