From 1b1d7b7744b3a269195f86c43400677f1b919a37 Mon Sep 17 00:00:00 2001 From: gujishh Date: Thu, 30 Apr 2026 12:40:43 +0900 Subject: [PATCH] fix(codex): remove invalid resume flags --- codex/SKILL.md | 4 +++- codex/SKILL.md.tmpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/codex/SKILL.md b/codex/SKILL.md index e90ec7e89e..a9379a2386 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -1188,7 +1188,7 @@ For a **resumed session** (user chose "Continue"): ```bash _REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; } # Fix 1: wrap with timeout (gtimeout/timeout fallback chain via probe helper) -_gstack_codex_timeout_wrapper 600 codex exec resume "" -C "$_REPO_ROOT" -s read-only -c 'model_reasoning_effort="medium"' --enable web_search_cached --json < /dev/null 2>"$TMPERR" | PYTHONUNBUFFERED=1 python3 -u -c " +_gstack_codex_timeout_wrapper 600 codex exec resume "" -c 'model_reasoning_effort="medium"' -c 'sandbox_mode="read-only"' --enable web_search_cached --json < /dev/null 2>"$TMPERR" | PYTHONUNBUFFERED=1 python3 -u -c " " # Fix 1: same hang detection pattern as new-session block @@ -1207,6 +1207,8 @@ mkdir -p .context Save the session ID printed by the parser (the line starting with `SESSION_ID:`) to `.context/codex-session-id`. +Working directory already comes from the resumed shell/session context, so `codex exec resume` should not pass `-C`. The resume subcommand also rejects `-s`; use `-c 'sandbox_mode="read-only"'` instead. + 6. Present the full streamed output: ``` diff --git a/codex/SKILL.md.tmpl b/codex/SKILL.md.tmpl index c311fc80b7..883751b03e 100644 --- a/codex/SKILL.md.tmpl +++ b/codex/SKILL.md.tmpl @@ -427,7 +427,7 @@ For a **resumed session** (user chose "Continue"): ```bash _REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; } # Fix 1: wrap with timeout (gtimeout/timeout fallback chain via probe helper) -_gstack_codex_timeout_wrapper 600 codex exec resume "" -C "$_REPO_ROOT" -s read-only -c 'model_reasoning_effort="medium"' --enable web_search_cached --json < /dev/null 2>"$TMPERR" | PYTHONUNBUFFERED=1 python3 -u -c " +_gstack_codex_timeout_wrapper 600 codex exec resume "" -c 'model_reasoning_effort="medium"' -c 'sandbox_mode="read-only"' --enable web_search_cached --json < /dev/null 2>"$TMPERR" | PYTHONUNBUFFERED=1 python3 -u -c " " # Fix 1: same hang detection pattern as new-session block @@ -446,6 +446,8 @@ mkdir -p .context Save the session ID printed by the parser (the line starting with `SESSION_ID:`) to `.context/codex-session-id`. +Working directory already comes from the resumed shell/session context, so `codex exec resume` should not pass `-C`. The resume subcommand also rejects `-s`; use `-c 'sandbox_mode="read-only"'` instead. + 6. Present the full streamed output: ```