deepseek-ai / deepseek-ai/awesome-deepseek-agent
docs(codex): document sandbox_mode config requirement for write access
- Dominant language
- No language data
- Stars
- 6.1k
- Forks
- 724
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
The Codex integration guide (docs/codex.md) generates a config.toml without `sandbox_mode`. This defaults to `read-only`, which means:
- File creation via `exec` → `echo > file` fails
- `apply_patch` tool cannot write files
- Users see "The filesystem is read-only" and think DeepSeek can't write code
## Root cause
The correct config key is `sandbox_mode` (not `sandbox`). Valid values:
- `read-only` (default)
- `workspace-write` — allows writes to workspace, /tmp, memories
- `danger-full-access` — full disk write access
When `sandbox_mode` is not explicitly set, Codex defaults to `read-only` and ALL file mutations fail regardless of the model's capability.
## Evidence
Tested with Moon Bridge + DeepSeek V4 + Codex CLI v0.128.0:
| sandbox_mode | exec read | exec write | apply_patch |
|---|---|---|---|
| (default / read-only) | ✅ | ❌ | ❌ |
| workspace-write | ✅ | ✅ | ✅ |
With `workspace-write`, DeepSeek V4 successfully:
- Creates files via `echo > /tmp/file.py`
- Edits files via `apply_patch` with correct git diff format
- Runs the modified code and verifies output
## Suggested fix
Add a note in the Codex integration guide about setting `sandbox_mode` in config.toml:
```toml
sandbox_mode = "workspace-write"
```
Or update the config generation to include this setting by default.
## Related
- Moon Bridge PR with protocol-level fixes: https://github.com/ZhiYi-R/moon-bridge/pull/29
Contributor guide
Assessment
This issue has not been assessed yet.