Skip to content

Report attached-shim from codex status when the desktop-shim is active - #60

Merged
ScriptedAlchemy merged 3 commits into
mainfrom
cursor/potato-shim-status-0a7b
Sep 16, 2026
Merged

ScriptedAlchemy merged 3 commits into
mainfrom
cursor/potato-shim-status-0a7b

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Potato fix for the shim/status truth gap: Bridge Ops proved Desktop injects via desktop-shim, but gbot codex status still reported private-stdio (or unknown) because the process-list detector outranked — or ignored — the shim path.

  • codexStatus now checks desktopShimStatus first: installed wrapper + Desktop-facing CODEX_CLI_PATH (GUI domain on Darwin) pointing at it reports desktopAttached: "attached-shim", outranking a stale-looking private-stdio process list. Inactive shim defers to the existing detectDesktopPrivateAppServer behavior (private-stdio / unknown).
  • desktop-shim.js inlines its socket resolution (was codexSocketPath) so codex-bridge can reuse desktopShimStatus without an import cycle; resolution semantics unchanged (CODEX_APP_SERVER_SOCK wins, else install-time CODEX_HOME).
  • formatCodexStatus prints desktop attached: attached-shim (Desktop shim bridges onto the managed daemon).
  • README status contract documents the new value; no pipe scraping, no binary patches, no new attach APIs, no upstream wait.

Hunches discarded: the MATCH2 regex needs no change — a shim-mediated spawn line carries no ChatGPT.app, so the detector was matching a stale pre-relaunch Resources/codex child (or equivalent), not false-positiving on the shim itself. Priority, not regex, is the fix.

Verification: new codexStatus test (active shim + DESKTOP_MAC_PS sample → attached-shim; installed-but-unpointed → private-stdio; quiet → unknown; plus live wiring through real wrapper/bridge files + CODEX_CLI_PATH), formatCodexStatus attached-shim line, desktop-shim suite 43/43, typecheck + validate clean, route tests pass. Full unit file: 19 pass / 43 fail — identical 43 failures at base (the bundled CLI doesn't self-execute in this VM, so all CLI-spawn tests fail environmentally here; CI is the real gate). Ripwire is not installed in this environment, so verification used node --test directly.

Open in Web Open in Cursor 

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6ebef9a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

Changeset fixed — .changeset/shim-status-attached.md now has valid frontmatter (changeset-bot confirms grok-bot-cli | Patch). CI should re-run.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Whip: Package CI stuck queued >30m after runner free; close/reopen to re-fire CI.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/potato-shim-status-0a7b branch from 9432399 to 516e7ff Compare September 16, 2026 01:00
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review September 16, 2026 01:05
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

cursoragent and others added 3 commits September 15, 2026 18:06
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Clear GROK_BOT_CODEX_EXPERIMENTAL in the rejection-envelope case so a host export cannot flip "experimental off" into unknown-status. For attached-shim live wiring on Darwin, mock launchctl getenv (GUI domain) via desktopShimStatus and inject that shim state into codexStatus without changing product GUI-domain semantics.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the cursor/potato-shim-status-0a7b branch from 50678c6 to 6ebef9a Compare September 16, 2026 01:07
@ScriptedAlchemy
ScriptedAlchemy merged commit 4563466 into main Sep 16, 2026
1 check failed
ScriptedAlchemy pushed a commit that referenced this pull request Sep 16, 2026
Publish attached-shim status (#60) to npm. 0.4.3 was on main but never published due to runner starvation + leftover changeset; this ships 0.4.4 as latest.
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.

2 participants