Skip to content

feat: add opt-in appAccess for Codex app-access prompts - #12

Open
devayush-bynd wants to merge 1 commit into
malhashemi:mainfrom
devayush-bynd:feat/app-access-option
Open

devayush-bynd wants to merge 1 commit into
malhashemi:mainfrom
devayush-bynd:feat/app-access-option

Conversation

@devayush-bynd

@devayush-bynd devayush-bynd commented Oct 26, 2026 •

Copy link
Copy Markdown

What breaks

With Codex CLI 0.164.0-alpha.11.1 and Computer Use 26.1021.1001631 (ChatGPT desktop app), every native app fails:

Computer Use was not approved to use Calculator

The app-server now forwards each app-access decision as mcpServer/elicitation/request, and the plugin declines it unconditionally. Two other things in the same build also stop the plugin from working: codex moved inside the bundle, and cua.listApps() hangs and then resets the JS kernel.

Changes

  • appAccess option — "decline" by default (current behaviour, and the only safe default for an option that approves app access), or "accept" to answer Codex's prompts with approval and ask Codex to remember the app (_meta.persist = "always"). /computer-use-doctor reports which policy applies.
  • timeout_ms — the node_repl js tool now receives the plugin's callTimeoutSeconds, instead of relying on the runtime's 30 s default.
  • Bundle layout — also look for codex at /Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex, where current bundles put it.
  • Doctor probe — attach to one app (cua.getApp("com.apple.finder")) instead of listing every app, because cua.listApps() hangs in this build. A declined app is reported as a warning (the App access check explains the fix), not a failure. Other platforms keep the inventory check, because binding an app there needs an open window.

Without appAccess: "accept" the behaviour is unchanged: prompts are still declined and the model still receives the note listing the ways to allow the app.

Evidence

Measured on macOS 26.6.2 (arm64) against the real engine:

  • timeout_ms: a 40 s await failed at 30.6 s (js execution timed out; kernel reset) without the argument, and succeeded at 40.5 s with timeout_ms: 90000. timeout_ms: 300000 is accepted, so passing callTimeoutSeconds straight through is safe.
  • cua.listApps(): timed out at 31.6 s and reset the kernel, even with timeout_ms set. cua.getApp("com.apple.finder") answered in ~1.1 s.
  • After the change, /computer-use-doctor passes every check, including Engine reachable (Finder attached) and a Finder screenshot; appAccess: "accept" also attached to an app that had previously been declined.

Tests

  • bun run check — format, lint, typecheck and all 83 tests pass.
  • Added coverage for the new option, both elicitation answers, the timeout_ms argument, and the doctor's app-access reporting.
  • Also tried it against a real Codex Computer Use install (tests above).

Codex 0.164 forwards app-access prompts as mcpServer/elicitation/request. With approval_policy unset, every native app failed with "Computer Use was not approved to use X" because the plugin declined them. Add an appAccess option ("decline" by default, matching current behavior; "accept" approves the app and asks Codex to remember it).

Also make the plugin work with the current Codex bundle and runtime:
- send callTimeoutSeconds to node_repl's js tool; its 30 s default kills long calls (a 40 s call failed at 30.6 s before this change)
- look for codex in ChatGPT.app/Contents/Resources/codex-cli/bin/codex
- probe native apps with getApp in the doctor, because listApps hangs and resets the JS kernel after 30 s in Codex 0.164; report a declined app as a warning instead of a failure
@devayush-bynd
devayush-bynd force-pushed the feat/app-access-option branch from 6293be7 to 04fc346 Compare October 26, 2026 15:37

This branch has not been deployed

No deployments
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