Repository navigation
fix(codex_app_server): fix sandbox mode, auth check and notification loop for Codex CLI - #616
Merged
codelion merged 1 commit intoNov 25, 2026
Conversation
…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>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #613. With Codex CLI 0.170 the
codex_app_serverprovider never completes a call:thread/startrejects"sandbox": {"mode": ..., "networkAccess": ...}. It now sends"sandbox": "read-only", and the network-off setting moves tosandboxPolicy: {"type": "readOnly", "networkAccess": false}onturn/start.account/readcan reportrequiresOpenaiAuth: truefor a signed-in ChatGPT account. The auth check now usesaccount/account.typeonly.request()parked a non-matching notification and thennext_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)requiresOpenaiAuth: truegenerates; a notification before a response does not spin; updated sandbox assertions. Without the fix the notification test hangs until the deadline.python3 -m blackon the changed files: unchanged.AI assistance: this change was prepared with Claude (AI coding assistant) and tested as described above.