Skip to content

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 #613

Done

Description

@eliseorobles

Versions: openevolve 0.4.1 (the same code is on main today, openevolve/llm/codex_app_server.py), Codex CLI 0.170.0, Ubuntu 24.04, Codex signed in with a ChatGPT account.

The codex_app_server provider never completes a call with Codex 0.170. Each problem below was reproduced with a raw JSON-RPC probe against codex app-server.

1. thread/start rejects the sandbox parameter

The provider sends "sandbox": {"mode": "read-only", "networkAccess": false} (line 295). Codex 0.170 refuses it with invalid value: map, expected map with a single key, so no turn ever starts.

What works: "sandbox": "read-only" on thread/start. To keep the network off, turn/start takes "sandboxPolicy": {"type": "readOnly", "networkAccess": false}.

2. A ChatGPT sign-in is read as signed out

account/read answers requiresOpenaiAuth: true even when account.type is "chatgpt" and the account is signed in. _ensure_authenticated (line 318) raises CodexAuthError on that flag.

What works: checking account.type == "chatgpt" alone.

3. request() busy-loops when a notification arrives before the response

Codex 0.170 sends notifications such as configWarning, remoteControl/status/changed and account/updated before some responses. request() parks a message whose id doesn't match in _pending. Then next_message() pops that same message straight back out of _pending before reading anything new. The loop spins on it forever, because the deadline is only checked when _pending is empty. Measured: a one-line "Reply READY" call spun at 100 % CPU for 10 minutes.

What works: inside request(), wait only on new messages (self._messages.get(timeout=remaining), with the deadline check). Leave parked notifications for _collect_response.

Two smaller things seen along the way

  • The app-server's stderr is a pipe that nothing reads during a turn, so a long, chatty turn can fill it and stall.
  • The app-server isn't started in its own process group, so a timeout can leave its child processes running.

We work around all of this with a subclass registered as a separate provider that changes those calls.

Activity

  1. added a commit that references this issue on Nov 25, 2026
    28a8cd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions