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
? `"AskUserQuestion" can resolve to multiple interactive surfaces at runtime:
5
6
6
-
### Tool resolution (read first)
7
+
- the **host MCP variant** (e.g. \`mcp__conductor__AskUserQuestion\`) when the host registers it;
8
+
- Codex's **\`request_user_input\`** tool, but only when it is present in the current tool list and the active mode/instructions allow calling it;
9
+
- a **normal chat question fallback** when the Codex session is interactive but no AskUserQuestion-like tool is callable.
7
10
8
-
"AskUserQuestion" can resolve to two tools at runtime: the **host MCP variant** (e.g. \`mcp__conductor__AskUserQuestion\` — appears in your tool list when the host registers it) or the **native** Claude Code tool.
11
+
**Rule:** if any \`mcp__*__AskUserQuestion\` variant is in your tool list, prefer it. If \`request_user_input\` is present and current Codex instructions allow it, use that next. If neither tool is callable in Codex, ask the same decision brief as a concise normal chat question and wait for the user's answer. This fallback is degraded UI, not a gstack failure.
12
+
13
+
**If no callable AskUserQuestion-like tool appears in a Codex session, do NOT report \`BLOCKED -- AskUserQuestion unavailable\` by default.** Use the normal chat fallback for interactive sessions. Report \`BLOCKED -- AskUserQuestion unavailable\` only when the run is non-interactive, no user turn can be awaited, and no explicit \`/plan-tune\` AUTO_DECIDE or skill-specific non-interactive auto-decision rule applies. Never silently auto-decide.`
14
+
: `"AskUserQuestion" can resolve to two tools at runtime: the **host MCP variant** (e.g. \`mcp__conductor__AskUserQuestion\` \u2014 appears in your tool list when the host registers it) or the **native** Claude Code tool.
9
15
10
16
**Rule:** if any \`mcp__*__AskUserQuestion\` variant is in your tool list, prefer it. Hosts may disable native AUQ via \`--disallowedTools AskUserQuestion\` (Conductor does, by default) and route through their MCP variant; calling native there silently fails. Same questions/options shape; same decision-brief format applies.
11
17
12
-
**If no AskUserQuestion variant appears in your tool list, this skill is BLOCKED.** Stop, report \`BLOCKED — AskUserQuestion unavailable\`, and wait for the user. Do not write decisions to the plan file as a substitute, do not emit them as prose and stop, and do not silently auto-decide (only \`/plan-tune\` AUTO_DECIDE opt-ins authorize auto-picking).
18
+
**If no AskUserQuestion variant appears in your tool list, this skill is BLOCKED.** Stop, report \`BLOCKED \u2014 AskUserQuestion unavailable\`, and wait for the user. Do not write decisions to the plan file as a substitute, do not emit them as prose and stop, and do not silently auto-decide (only \`/plan-tune\` AUTO_DECIDE opt-ins authorize auto-picking).`;
19
+
constdeliveryRule=_ctx.host==='codex'
20
+
? "Every AskUserQuestion is a decision brief. Send it as tool_use when a callable AskUserQuestion-like tool is available; in Codex chat fallback, render the same decision brief as normal prose and stop for the user's answer."
21
+
: 'Every AskUserQuestion is a decision brief and must be sent as tool_use, not prose.';
22
+
constdeliveryChecklist=_ctx.host==='codex'
23
+
? 'You are calling the tool, or using the Codex chat fallback because no AskUserQuestion-like tool is callable'
24
+
: 'You are calling the tool, not writing prose';
25
+
26
+
return`## AskUserQuestion Format
27
+
28
+
### Tool resolution (read first)
29
+
30
+
${toolResolution}
13
31
14
32
### Format
15
33
16
-
Every AskUserQuestion is a decision brief and must be sent as tool_use, not prose.
34
+
${deliveryRule}
17
35
18
36
\`\`\`
19
37
D<N> — <one-line question title>
@@ -106,7 +124,7 @@ Before calling AskUserQuestion, verify:
106
124
- [ ] (recommended) label on one option (even for neutral-posture)
In plan mode, allowed because they inform the plan: \`$B\`, \`$D\`, \`codex exec\`/\`codex review\`, writes to \`~/.gstack/\`, writes to the plan file, and \`open\` for generated artifacts.
27
+
28
+
## Skill Invocation During Plan Mode
29
+
30
+
If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant \u2014 \`mcp__*__AskUserQuestion\` or native; see "AskUserQuestion Format \u2192 Tool resolution") satisfies plan mode's end-of-turn requirement. If no variant is callable, the skill is BLOCKED \u2014 stop and report \`BLOCKED \u2014 AskUserQuestion unavailable\` per the AskUserQuestion Format rule. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION \u2014 ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.`;
31
+
}
32
+
23
33
return`## Plan Mode Safe Operations
24
34
25
35
In plan mode, allowed because they inform the plan: \`$B\`, \`$D\`, \`codex exec\`/\`codex review\`, writes to \`~/.gstack/\`, writes to the plan file, and \`open\` for generated artifacts.
26
36
27
37
## Skill Invocation During Plan Mode
28
38
29
-
If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant — \`mcp__*__AskUserQuestion\` or native; see "AskUserQuestion Format → Tool resolution") satisfies plan mode's end-of-turn requirement. If no variant is callable, the skill is BLOCKED — stop and report \`BLOCKED — AskUserQuestion unavailable\` per the AskUserQuestion Format rule. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION — ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.`;
39
+
If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant -- \`mcp__*__AskUserQuestion\` or native; see "AskUserQuestion Format -> Tool resolution") satisfies plan mode's end-of-turn requirement. If no AskUserQuestion-like tool is callable in Codex, use the Codex chat fallback from "AskUserQuestion Format -> Tool resolution": ask the decision brief as a normal chat question and wait for the user. Report BLOCKED only for a genuinely non-interactive run with no allowed auto-decision. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION -- ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.`;
Copy file name to clipboardExpand all lines: test/fixtures/golden/codex-ship-SKILL.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ In plan mode, allowed because they inform the plan: `$B`, `$D`, `codex exec`/`co
115
115
116
116
## Skill Invocation During Plan Mode
117
117
118
-
If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant — `mcp__*__AskUserQuestion` or native; see "AskUserQuestion Format → Tool resolution") satisfies plan mode's end-of-turn requirement. If no variant is callable, the skill is BLOCKED — stop and report `BLOCKED — AskUserQuestion unavailable` per the AskUserQuestion Format rule. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION — ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.
118
+
If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant -- `mcp__*__AskUserQuestion` or native; see "AskUserQuestion Format -> Tool resolution") satisfies plan mode's end-of-turn requirement. If no AskUserQuestion-like tool is callable in Codex, use the Codex chat fallback from "AskUserQuestion Format -> Tool resolution": ask the decision brief as a normal chat question and wait for the user. Report BLOCKED only for a genuinely non-interactive run with no allowed auto-decision. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION -- ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.
119
119
120
120
If `PROACTIVE` is `"false"`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?"
121
121
@@ -283,15 +283,19 @@ AI orchestrator (e.g., OpenClaw). In spawned sessions:
283
283
284
284
### Tool resolution (read first)
285
285
286
-
"AskUserQuestion" can resolve to two tools at runtime: the **host MCP variant** (e.g. `mcp__conductor__AskUserQuestion` — appears in your tool list when the host registers it) or the **native** Claude Code tool.
286
+
"AskUserQuestion" can resolve to multiple interactive surfaces at runtime:
287
287
288
-
**Rule:** if any `mcp__*__AskUserQuestion` variant is in your tool list, prefer it. Hosts may disable native AUQ via `--disallowedTools AskUserQuestion` (Conductor does, by default) and route through their MCP variant; calling native there silently fails. Same questions/options shape; same decision-brief format applies.
288
+
- the **host MCP variant** (e.g. `mcp__conductor__AskUserQuestion`) when the host registers it;
289
+
- Codex's **`request_user_input`** tool, but only when it is present in the current tool list and the active mode/instructions allow calling it;
290
+
- a **normal chat question fallback** when the Codex session is interactive but no AskUserQuestion-like tool is callable.
289
291
290
-
**If no AskUserQuestion variant appears in your tool list, this skill is BLOCKED.** Stop, report `BLOCKED — AskUserQuestion unavailable`, and wait for the user. Do not write decisions to the plan file as a substitute, do not emit them as prose and stop, and do not silently auto-decide (only `/plan-tune` AUTO_DECIDE opt-ins authorize auto-picking).
292
+
**Rule:** if any `mcp__*__AskUserQuestion` variant is in your tool list, prefer it. If `request_user_input` is present and current Codex instructions allow it, use that next. If neither tool is callable in Codex, ask the same decision brief as a concise normal chat question and wait for the user's answer. This fallback is degraded UI, not a gstack failure.
293
+
294
+
**If no callable AskUserQuestion-like tool appears in a Codex session, do NOT report `BLOCKED -- AskUserQuestion unavailable` by default.** Use the normal chat fallback for interactive sessions. Report `BLOCKED -- AskUserQuestion unavailable` only when the run is non-interactive, no user turn can be awaited, and no explicit `/plan-tune` AUTO_DECIDE or skill-specific non-interactive auto-decision rule applies. Never silently auto-decide.
291
295
292
296
### Format
293
297
294
-
Every AskUserQuestion is a decision brief and must be sent as tool_use, not prose.
298
+
Every AskUserQuestion is a decision brief. Send it as tool_use when a callable AskUserQuestion-like tool is available; in Codex chat fallback, render the same decision brief as normal prose and stop for the user's answer.
295
299
296
300
```
297
301
D<N> — <one-line question title>
@@ -384,7 +388,7 @@ Before calling AskUserQuestion, verify:
384
388
-[ ] (recommended) label on one option (even for neutral-posture)
0 commit comments