Skip to content

feat(grok): offer one-click updates through grok update - #13523

Merged
juliusmarminge merged 3 commits into
mainfrom
t3code/grok-native-update
Sep 25, 2026
Merged

juliusmarminge merged 3 commits into
mainfrom
t3code/grok-native-update

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Grok was manual-only: no latest version and no update command, so an outdated Grok never showed an update advisory, toast, or Update now.

grok update finds the installer that owns the binary (its own installer or npm), so Grok now works like Cursor: the resolved executable is its own updater (<binary> update), and a binary that can't be resolved stays manual-only. The updater runs with the instance's environment, so an instance with a custom GROK_HOME updates that home rather than the default one. The latest version comes from the npm registry's @xai-official/grok, whose latest tag tracks Grok's stable channel, the one grok update installs by default. T3's existing post-update check still decides whether the update actually landed.

Evidence

Same seeded state, same viewport, Grok 0.2.8 installed with 1.0.41 published. Base is origin/main.

Before (main) After (this PR)
Before: Grok v0.2.8 card with no update indicator After: update toast for Grok v1.0.41 and an update indicator on the card

After, version popover: Update now plus the copyable grok update command for the configured binary.

After: Grok version popover with Update now and the grok update command

Verification

  • vp test run src/provider/Drivers/GrokDriver.test.ts src/provider/Drivers/CursorDriver.test.ts: 4 passed. The new test covers a configured binary getting <binary> update with the instance's GROK_HOME, and a missing binary staying manual-only.
  • Server typecheck: no errors. Lint clean on the touched files.
  • Ran grok update on a copy of a real 0.2.8 binary with HOME / GROK_HOME pointed at throwaway directories. It ran without a TTY, exited 0 and installed 1.0.41 into that home. Nothing outside the sandbox changed.
  • I did not click Update now against a real install.

Limits

  • For npm-managed Grok, grok update uses whichever npm is on PATH. If that isn't the npm that owns the install, the post-update check reports the update as unchanged rather than succeeded.
  • Grok has no targeted-version install in T3 (canInstallVersion stays false). grok update --version exists but isn't wired up here.

🤖 Generated with Claude Code (Claude Opus 5.5)


Devin Review

Summary by CodeRabbit

  • New Features
    • Grok installations with a resolved executable can now be updated through the app. If no executable is found, updates remain manual.
  • Documentation
    • Clarified how update availability works for Cursor and Grok: resolved executables can be updated through their own command, while unresolved installations remain manual-only.

Grok was manual-only with no latest version, so an outdated Grok never
showed an update advisory. `grok update` finds the installer that owns the
binary itself, like `cursor-agent update`, so the resolved executable is
now its own updater. The npm `latest` tag of `@xai-official/grok` tracks
Grok's stable channel and supplies the latest version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 25, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: ba12476c-67bb-4ff7-8b7c-deb921264026

📥 Commits

Reviewing files that changed from the base of the PR and between d4a3345 and 180494e.

📒 Files selected for processing (3)
  • apps/server/src/provider/Drivers/GrokDriver.test.ts
  • apps/server/src/provider/Drivers/GrokDriver.ts
  • docs/internals/providers.md

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The Grok driver now resolves maintenance capabilities from its configured executable. It uses an updater when executable context is available and manual-only capabilities otherwise. Snapshot enrichment receives the resolved capabilities.

Changes

Grok maintenance capabilities

Layer / File(s) Summary
Configure maintenance resolution
apps/server/src/provider/Drivers/GrokDriver.ts
The driver configures @xai-official/grok updates to run update on the resolved executable with its environment and the grok lock key. Without executable context, it returns manual-only capabilities.
Apply and validate resolved capabilities
apps/server/src/provider/Drivers/GrokDriver.ts, apps/server/src/provider/Drivers/GrokDriver.test.ts, docs/internals/providers.md
Snapshot enrichment now receives resolved capabilities. Tests cover configured and missing executables. Provider guidance describes the update command for resolved Grok executables.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GrokDriver
  participant MaintenanceResolver
  participant SnapshotEnrichment
  GrokDriver->>MaintenanceResolver: Resolve capabilities from executable context
  MaintenanceResolver-->>GrokDriver: Return updater or manual-only capabilities
  GrokDriver->>SnapshotEnrichment: Pass resolved capabilities to enrichGrokSnapshot
Loading

Suggested reviewers: t3dotgg

Merge Risk: ⚪ Minimal · up to 18049

Grok’s update command supports npm-managed installations, and missing executables retain manual update guidance. The change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding one-click Grok updates through grok update.
Description check ✅ Passed The description explains what changed and why, includes UI evidence, verification details, and known limitations. The required checklist section is not included, but the description is otherwise compl…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/server/src/provider/Drivers/GrokDriver.ts
@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The production driver adds one-click Grok updates and enables version advisories for existing Grok configurations by default. Because this changes default product behavior rather than requiring a new opt-in setting, human review is warranted.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +11 B (+0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −11 B (−0.2%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +22 B (+0.3%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.3 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −13 B (−0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −2 B (−0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −11 B (−0.2%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: d4a3345 · PR result: 180494e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

`grok update` installs under `GROK_HOME`, so an instance configured with a
custom home updated the default install and left its own binary outdated.
Pass the instance environment to the updater, like Codex does for
`CODEX_HOME`, and drop the node-builtin diagnostic suppression in the test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@juliusmarminge
juliusmarminge merged commit 72447f2 into main Sep 25, 2026
24 of 25 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/grok-native-update branch September 25, 2026 00:37
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* fix(web): sidebar Back always returns to the main app by @t3dotgg in pingdotgg/t3code#13516
* fix(desktop): desktop updates reconnect in seconds, not minutes by @t3dotgg in pingdotgg/t3code#12006
* fix(connect): remove tunnels after hosts go offline by @t3dotgg in pingdotgg/t3code#9386
* fix(mobile): capture a lit 6.9-inch lock screen in the agent-activity showcase by @juliusmarminge in pingdotgg/t3code#13522
* feat(grok): offer one-click updates through `grok update` by @juliusmarminge in pingdotgg/t3code#13523
* fix(mobile): make Android subscription usage widgets scrollable by @tris203 in pingdotgg/t3code#13474
* fix(web): keep sidebar terminal pulses in sync by @t3dotgg in pingdotgg/t3code#12962
* feat(web): add iPhone Duo 3D controls by @juliusmarminge in pingdotgg/t3code#12813
* fix(relay): export tunnel cleanup counters to Axiom by @juliusmarminge in pingdotgg/t3code#13528
* fix(server): Grok accounts with no usage yet no longer vanish from Limits by @jakeleventhal in pingdotgg/t3code#12799
* fix(server): report the Grok account email so usage limits merge across environments by @jakeleventhal in pingdotgg/t3code#12588
* feat(web): add usage page keybinding by @jakeleventhal in pingdotgg/t3code#9434
* chore: clear Effect language service suggestions by @juliusmarminge in pingdotgg/t3code#13536
* ci(relay): add a forced manual relay deploy by @juliusmarminge in pingdotgg/t3code#13550
* fix(web): selected text stays visible on a revealed file line by @t3dotgg in pingdotgg/t3code#13548
* fix(web): collapsed composer bar stops flipping its labels while you scroll by @t3dotgg in pingdotgg/t3code#13555
* fix(clients): sync status no longer flickers when opening running threads by @t3dotgg in pingdotgg/t3code#13551
* fix(server): newer Codex models get T3 Code's instructions again by @t3dotgg in pingdotgg/t3code#13547


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260924.2223...v0.0.43-nightly.20260925.2237

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2237
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 27, 2026
Merges `pingdotgg/t3code` `78af372cf..ebdcda1` (39 commits) into the
fork. The merge PR is not stacked; it branches from `main`.

## Resolution
- **8 conflicts.** Each was resolved using the verdict `preflight.mjs`
gave for it. The per-file details are in
`docs/fork/upstream-merge-log.md`.
- `apps/server/src/cli/pair.ts` stays deleted, as listed in
`deletedUpstreamPaths`.
- `ThreadPullRequestsPanel.tsx` takes upstream. Upstream pingdotgg#13061 now
names the repository on each linked PR, so the fork's delta there has
converged and the file is identical to upstream.
- **New gate.** Upstream's chat code-block **Run** button (pingdotgg#13060) runs
`scripts.run` with a synthetic `chat-code-block` id. The Moatless
backend rejects that id with `ScriptNotFound`, so `ChatView` hides the
button on environments that report `workspaceScripts`. This is recorded
in the inventory (`host-run-scripts`) and in `gaps.md`.
- **Lint.** Upstream pingdotgg#13371/pingdotgg#13397 made `shadcn(no-arbitrary-values)` a
lint error, which flagged 130 hits in fork code, mostly
`settings/moatless/**`. I mapped each one onto the type scale the same
way upstream mapped its own: `text-[13px]` becomes `text-sm`, `[11px]`
becomes `text-2xs`, `[10.5px]` and `[.65rem]` become `text-3xs`, and so
on. Some Moatless settings text therefore renders at slightly different
sizes.
- **Type fix.** The fork's Mermaid `MarkdownCodeBlock` now passes
upstream's required `isStreaming` prop.
- **Lockfile.** `pnpm-lock.yaml` was re-derived with `install.mjs`.
- **File counts.** 515 files landed, against 489 in the upstream range.
The fork delta is 756 files. The gap is explained in the log entry.

## Verification
- A full run of `verify.mjs` passes all 10 checks, tests included.
- The unsupported-method derivation reports no ADD and no DROP.
- `resolution-check.mjs` and `duplicate-adds.mjs` report nothing.

## Upstream feature classification

### Usable as-is
- The sidebar Back button always returns to the main app (pingdotgg#13516),
including Escape on settings.
- Linked PRs show repository names (pingdotgg#13061).
- Colors come from theme tokens, text uses scale values, and disabled
controls have consistent opacity (pingdotgg#13371, pingdotgg#13397, pingdotgg#11441).
- Working and monitoring threads fade in the sidebar again (pingdotgg#13506).
Sidebar terminal pulses stay in sync (pingdotgg#12962).
- Selected text stays visible on a revealed file line (pingdotgg#13548).
- The usage page has a keybinding, `usage.open` (pingdotgg#9434).

### Unsupported in Moatless / needs implementation
- **Per-thread auto-settle switch (pingdotgg#11846).** This adds the
`thread.auto-settle.set` command, the `thread.auto-settle-set` event,
and the `threadAutoSettleOptOut` capability. Moatless never auto-settles
and does not report the capability, so the menu item stays hidden.
- **Run a shell command from a chat code block (pingdotgg#13060).** Gated off on
`workspaceScripts` environments. It needs `scripts.run` to accept an
inline command.
- **iPhone Duo 3D device controls (pingdotgg#12813).** Behind
`FEATURES.deviceHub`, which is off.
- **One-click Grok CLI update (pingdotgg#13523).** Provider management is behind
`FEATURES.providerConfiguration`, which is off.
- **Relay/tunnel cleanup and a managed endpoint reaper (pingdotgg#9386,
pingdotgg#13528).** Also the forced relay deploy workflow (pingdotgg#13550). Relay is
decided out of the fork.
- **Desktop update reconnect (pingdotgg#12006).** Electron is not a target.

### Backend behavior to consider reproducing in Moatless
- **Racy edits in review diffs (pingdotgg#12613).** The review index copy rounds
its mtime down so that edits made in the same second as the copy still
appear in the diff (`apps/server/src/vcs/GitVcsDriverCore.ts`).
- **Codex 0.156 (pingdotgg#13481, pingdotgg#13480).** Codex 0.156 is now the minimum, and
the app-server protocol was regenerated
(`packages/effect-codex-app-server`).
- **Claude banked resets (pingdotgg#13118).** Upstream shows and redeems them
(`claudeResetCredits.ts`, `resetCreditCoordinator.ts`). Separately, Grok
account emails are reported so usage limits merge across environments,
and Grok accounts no longer vanish (pingdotgg#12588, pingdotgg#12799). Codex keeps its
reset answer when the re-probe fails (pingdotgg#13363).
- **ACP (pingdotgg#13386).** Keeps one answer when a running tool reports
progress.
- **Antigravity (pingdotgg#13388, pingdotgg#13389).** Stop ends commands that outlived
their turn, and Windows unpacking stays under MAX_PATH.
- **Streamed section titles (pingdotgg#13504).** A title waits for the text
beneath it.
- **OpenTelemetry (pingdotgg#13355, pingdotgg#13469).** The kill switch is honored, and a
malformed `OTEL_RESOURCE_ATTRIBUTES` no longer stops startup.
- **Settlement.** If Moatless ever adds automatic settlement, it must
honor the per-thread opt-out from pingdotgg#11846.

The gaps register (`docs/fork/gaps.md`) was updated for the auto-settle
capability, the chat-run gate, and three runtime-fix bullets.

## Left undone
- Four files that auto-merged cleanly carry small fork deltas with no
path-policy entry: `AgentsPanel.tsx`, `ThreadTerminalDrawer.tsx`,
`client-runtime/src/state/threadDetail.ts` and `threadReducer.test.ts`.
- `preflight.mjs` labels a modify/delete conflict on a
`deletedUpstreamPaths` entry as `[unlisted]`. That is a minor script bug
and was not fixed here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/8f4381ee-c9ed-4fc5-9ffd-039ee15731ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant