Skip to content

Show it a video you love. Get a new video in the same style. An AI crew (Claude Code or Codex) plans, builds and reviews it with you.

Codex: full-access sandbox by default so it can start Chrome to render (CODEX_SANDBOX to override)

許元豪eae98f417316
diff --git a/README.md b/README.md
index 66b08f1..4a55f6d 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,7 @@ committed. See [`secrets.example.json`](secrets.example.json) for the format.
| `YATING_KEY` | Yating's Taiwanese Mandarin voices, for narration |
| `PIXABAY_KEY`, `FREESOUND_KEY` | More images, music and sound effects you're allowed to use (optional, Openverse works without a key) |
| `FFMPEG_DIR`, `CHROME_PATH`, `CODEX_BIN`, `PYTHON` | Where to find these tools if they're not on your PATH |
+| `CODEX_SANDBOX` | Codex sandbox mode (default `danger-full-access`, like Claude Code with Bash allowed; `workspace-write` blocks the Chrome renderer) |
| `BUILDERS`, `MAX_AGENTS` | How many agents work on one video at once (default 6), and the limit across all projects (default 12) |
| `PORT` | Web port (default 4318) |
diff --git a/README.zh-CN.md b/README.zh-CN.md
index e4dd00f..d3785f9 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -85,6 +85,7 @@ Claude Code 会自己读到 repo 里的 skills,Codex 会读 `AGENTS.md`,不
| `YATING_KEY` | 雅婷的台湾华语语音,拿来配旁白 |
| `PIXABAY_KEY`、`FREESOUND_KEY` | 可以找到更多能合法使用的图片、音乐、音效(没有也行,会用 Openverse) |
| `FFMPEG_DIR`、`CHROME_PATH`、`CODEX_BIN`、`PYTHON` | 这些工具不在 PATH 上的话,在这里指定位置 |
+| `CODEX_SANDBOX` | Codex 的沙盒模式(默认 `danger-full-access`,和 Claude Code 允许 Bash 时一样;`workspace-write` 会让 Chrome 渲染跑不起来) |
| `BUILDERS`、`MAX_AGENTS` | 一支片同时几个 AI 在做(默认 6)、所有项目加起来最多几个(默认 12) |
| `PORT` | 网站用的端口(默认 4318) |
diff --git a/README.zh-TW.md b/README.zh-TW.md
index 91213cb..40ac56c 100644
--- a/README.zh-TW.md
+++ b/README.zh-TW.md
@@ -85,6 +85,7 @@ Claude Code 會自己讀到 repo 裡的 skills,Codex 會讀 `AGENTS.md`,不
| `YATING_KEY` | 雅婷的台灣華語語音,拿來配旁白 |
| `PIXABAY_KEY`、`FREESOUND_KEY` | 可以找到更多能合法使用的圖片、音樂、音效(沒有也行,會用 Openverse) |
| `FFMPEG_DIR`、`CHROME_PATH`、`CODEX_BIN`、`PYTHON` | 這些工具不在 PATH 上的話,在這裡指定位置 |
+| `CODEX_SANDBOX` | Codex 的沙盒模式(預設 `danger-full-access`,和 Claude Code 允許 Bash 時一樣;`workspace-write` 會讓 Chrome 渲染跑不起來) |
| `BUILDERS`、`MAX_AGENTS` | 一支片同時幾個 AI 在做(預設 6)、所有專案加起來最多幾個(預設 12) |
| `PORT` | 網站用的埠號(預設 4318) |
diff --git a/app/server/agents/index.mjs b/app/server/agents/index.mjs
index e33918f..4ad0338 100644
--- a/app/server/agents/index.mjs
+++ b/app/server/agents/index.mjs
@@ -56,9 +56,12 @@ function parseClaude(obj, emit, st) {
}
function codexArgs(sessionId, cwd) {
- // workspace-write sandbox, no approval prompts (headless), network on (asset search / yt-dlp). Set via -c: works for exec and resume.
- const common = ['--json', '--skip-git-repo-check', '-c', 'sandbox_mode=workspace-write', '-c', 'approval_policy=never',
- '-c', 'sandbox_workspace_write.network_access=true'];
+ // No approval prompts (headless). Codex's workspace-write sandbox can't start Chrome (spawn EPERM), and every render
+ // needs it, so the default is full access — the same reach Claude Code gets with Bash allowed. Set CODEX_SANDBOX=
+ // workspace-write to keep the sandbox (planning works; rendering won't). Set via -c: works for exec and resume.
+ const mode = process.env.CODEX_SANDBOX || 'danger-full-access';
+ const common = ['--json', '--skip-git-repo-check', '-c', `sandbox_mode=${mode}`, '-c', 'approval_policy=never',
+ ...(mode === 'workspace-write' ? ['-c', 'sandbox_workspace_write.network_access=true'] : [])];
return sessionId ? ['exec', 'resume', ...common, sessionId, '-'] : ['exec', ...common, '-C', cwd, '-'];
}
function parseCodex(obj, emit, st) {
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index ad8bf99..747619b 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -114,7 +114,7 @@ projects/<id>/
| | Claude Code | Codex |
|---|---|---|
-| Command | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=workspace-write -c approval_policy=never …` |
+| Command | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=danger-full-access -c approval_policy=never (CODEX_SANDBOX) …` |
| Resume | `--resume <session>` | `exec resume <thread>` |
| Prompt | stdin | stdin |
diff --git a/docs/zh-CN/ARCHITECTURE.md b/docs/zh-CN/ARCHITECTURE.md
index a480f1e..e148910 100644
--- a/docs/zh-CN/ARCHITECTURE.md
+++ b/docs/zh-CN/ARCHITECTURE.md
@@ -101,7 +101,7 @@ projects/<id>/
| | Claude Code | Codex |
|---|---|---|
-| 指令 | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=workspace-write -c approval_policy=never …` |
+| 指令 | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=danger-full-access -c approval_policy=never (CODEX_SANDBOX) …` |
| 接续对话 | `--resume <session>` | `exec resume <thread>` |
| 指令传递 | stdin | stdin |
diff --git a/docs/zh-TW/ARCHITECTURE.md b/docs/zh-TW/ARCHITECTURE.md
index 5a5ab4e..794ee6a 100644
--- a/docs/zh-TW/ARCHITECTURE.md
+++ b/docs/zh-TW/ARCHITECTURE.md
@@ -101,7 +101,7 @@ projects/<id>/
| | Claude Code | Codex |
|---|---|---|
-| 指令 | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=workspace-write -c approval_policy=never …` |
+| 指令 | `claude -p --output-format stream-json --verbose --permission-mode acceptEdits --allowedTools …` | `codex exec --json -c sandbox_mode=danger-full-access -c approval_policy=never (CODEX_SANDBOX) …` |
| 接續對話 | `--resume <session>` | `exec resume <thread>` |
| 指令傳遞 | stdin | stdin |