--sandbox workspace-write fails with read-only mount in Azure DevOps Pipeline CI despite correct flags
What version of Codex CLI is running?
0.104.0
What subscription do you have?
OpenAI API (Pay-as-you-go)
Which model were you using?
gpt-5-codex
What platform is your computer?
Azure DevOps Pipeline (Ubuntu-latest agent)
What terminal emulator and version are you using (if applicable)?
Azure DevOps Pipeline bash shell (non-interactive CI environment)
What issue are you seeing?
Summary: --sandbox workspace-write --ask-for-approval never flags result in read-only workspace mount in CI environments, despite official documentation recommending this combination for automated/CI usage.
Blocked. The workspace is mounted read-only (`touch foo.txt` fails with Permission denied),
so I can't update files, create files, or create the required commit.
Once write access is restored, I can proceed with the implementation.
What steps can reproduce the bug?
Install Codex CLI in CI environment:npm install -g @openai/codex@0.104.0
Configure and login:
export OPENAI_API_KEY="sk-proj-..."
printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key
Try official recommended flags for CI
echo "Create file test.txt with text 'hello'" | \
codex -C . --sandbox workspace-write --ask-for-approval never exec -m gpt-5-codex -
Expected: File created, no prompts
Actual: Codex says "workspace is mounted read-only", no file created
Try bypass flag:
echo "Create file test.txt with text 'hello'" | \
codex -C . --dangerously-bypass-approvals-and-sandbox exec -m gpt-5-codex -
File created successfully.
Only --dangerously-bypass flag works.
What is the expected behavior?
Expected behavior (per documentation):
--sandbox workspace-write should allow file modifications within workspace directory
--ask-for-approval never should disable approval prompts
This combination should work for CI/CD unattended operation
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗