You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ce-work-beta): clarify launch vs poll as separate Bash tool calls
In testing, agents merged the background launch and polling loop into
one Bash call, hitting the 2-minute timeout. The skill now explicitly
labels Step A (launch, run_in_background: true on the tool parameter)
and Step B (poll, separate foreground calls) and warns that shell &
is not equivalent to the tool parameter.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: plugins/compound-engineering/skills/ce-work-beta/references/codex-delegation-workflow.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,10 +197,11 @@ This intentionally ignores untracked files. Only staged or unstaged modification
197
197
198
198
If tracked files are dirty, stop and present options: (1) commit current changes, (2) stash explicitly (`git stash push -m "pre-delegation"`), (3) continue in standard mode (sets `delegation_active` to false). Do not auto-stash user changes.
199
199
200
-
**Delegation invocation:** For each batch:
200
+
**Delegation invocation:** For each batch, execute these as **separate Bash tool calls** (not combined into one):
201
201
202
-
1. Write the prompt file using the Prompt Template above
203
-
2. Launch the Codex CLI in the **background** (no timeout ceiling):
202
+
**Step A — Launch (background, separate Bash call):**
203
+
204
+
Write the prompt file, then make a single Bash tool call with `run_in_background: true` set on the tool parameter. This call returns immediately and has no timeout ceiling.
Run this command with `run_in_background: true`so there is no timeout ceiling. Codex batches can take 5-20+ minutes depending on plan size and test-fix iterations.
223
+
Critical: `run_in_background: true`must be set as a **Bash tool parameter**, not as a shell `&` suffix. The tool parameter is what removes the timeout ceiling. A shell `&` inside a foreground Bash call still hits the 2-minute default timeout.
223
224
224
-
Quoting is critical for the `-c` flag: use single quotes around the entire key=value and double quotes around the TOML string value inside. Example: `-c 'model_reasoning_effort="high"'`. The `-m` value does not need special quoting unless the model name contains spaces.
225
+
Quoting is critical for the `-c` flag: use single quotes around the entire key=value and double quotes around the TOML string value inside. Example: `-c 'model_reasoning_effort="high"'`.
225
226
226
227
Do not improvise CLI flags or modify this invocation template.
227
228
228
-
3.**Poll for completion.** Immediately after launching, enter a foreground polling loop that checks every 10 seconds whether the result file exists. This keeps the agent's turn active so the user cannot interfere with the working tree during delegation.
229
+
**Step B — Poll (foreground, separate Bash calls):**
230
+
231
+
After the launch call returns, make a **new, separate** foreground Bash tool call that polls for the result file. This keeps the agent's turn active so the user cannot interfere with the working tree.
If the output is "Waiting for Codex...", issue the same polling command again. Repeat until the result file appears. When the output is "DONE", read the result file and proceed to classification.
242
+
If the output is "Waiting for Codex...", issue the same polling command again as another separate Bash call. Repeat until the output is "DONE", then read the result file and proceed to classification.
240
243
241
244
**Result classification:** Codex is responsible for running verification internally and fixing failures before reporting -- the orchestrator does not re-run verification independently.
0 commit comments