Skip to content

fix(codex_app_server): fix sandbox mode, auth check and notification loop for Codex CLI - #616

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Laihu08:fix/613-codex-app-server-fixes
Nov 25, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Laihu08:fix/613-codex-app-server-fixes

Conversation

@Laihu08

@Laihu08 Laihu08 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #613. With Codex CLI 0.170 the codex_app_server provider never completes a call:

  • thread/start rejects "sandbox": {"mode": ..., "networkAccess": ...}. It now sends "sandbox": "read-only", and the network-off setting moves to sandboxPolicy: {"type": "readOnly", "networkAccess": false} on turn/start.
  • account/read can report requiresOpenaiAuth: true for a signed-in ChatGPT account. The auth check now uses account / account.type only.
  • request() parked a non-matching notification and then next_message() popped it straight back, spinning until the deadline. request() now waits only on new messages; parked ones are left for _collect_response.

The two smaller points in the issue (unread stderr pipe, process group) are not changed here.

Testing

  • export OPENAI_API_KEY=test-key-for-unit-tests && python3 -m unittest discover tests -> Ran 1142 tests, OK (skipped=7)
  • Added tests: ChatGPT account with requiresOpenaiAuth: true generates; a notification before a response does not spin; updated sandbox assertions. Without the fix the notification test hangs until the deadline.
  • python3 -m black on the changed files: unchanged.

AI assistance: this change was prepared with Claude (AI coding assistant) and tested as described above.

…loop for Codex CLI

- Send `sandbox: "read-only"` on thread/start and put the network-off
  setting in `sandboxPolicy` on turn/start; Codex 0.170 rejects the map form.
- Decide authentication from `account` / `account.type` only; a signed-in
  ChatGPT account can still report `requiresOpenaiAuth: true`.
- request() now waits only on new messages, so a notification parked while
  waiting for a response is no longer popped back in a busy loop.

Fixes algorithmicsuperintelligence#613

Assisted-by: Claude <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Nov 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codelion
codelion merged commit 28a8cd3 into algorithmicsuperintelligence:main Nov 25, 2026
5 checks passed
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.

codex_app_server fails with Codex CLI 0.170: sandbox param rejected, ChatGPT sign-in read as signed out, request() busy-loops on parked notifications

3 participants