openai / openai/codex-plugin-cc

codex exec fails at startup with "failed to initialize in-process app-server client: Operation not permitted (os error 1)" in non-interactive/CI-like environments

Open
#635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

codex exec fails at startup with "failed to initialize in-process app-server client: Operation not permitted (os error 1)" in non-interactive/CI-like environments

On macOS (Darwin 25.6.0, Apple Silicon), codex-cli 0.147.0 installed at /opt/homebrew/bin/codex, invoking codex exec --sandbox read-only --cd "" from a non-interactive automation context (spawned by another agent tool, no TTY) consistently fails before doing any work. First it warns WARNING: proceeding, even thoughus could not create PATH aliases: Operation not permitted (os error 1) (note the "even thoughus" typo in the message itself), then exits with Error: failed to initialize in-process app-server client: Operation not permitted (os error 1). Pointing CODEX_HOME at a fresh writable temp directory occasionally gets past init, after which streaming to https://chatgpt.com/backend-api/codex/responses was unstable in our restricted-network environment (Reconnecting... 5/5 on WebSocket, then stream disconnected before completion twice on the HTTPS fallback, exit 1) — that part may be our network policy, but the app-server init failure reproduces even with all sandboxing on our side disabled. Expected: codex exec should either run headless or say exactly which file/socket it could not create and where. Happy to provide RUST_LOG output if you tell me which env var to set.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported codex exec --sandbox read-only --cd <repo> "<prompt>" command without a TTY on macOS, including the fresh CODEX_HOME comparison. Trace the startup path that creates PATH aliases and initializes the in-process app-server client, then identify the specific permission failure. Done means headless execution works or the error names the file or socket it could not create.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.