Codex User Questions¶
Read once; reuse.
- Ask only for a genuinely missing decision, material input or protected action. Authorized preparation and internal recovery need no new consent. The root owns user questions. Children return context, question, choices, custom syntax and answer mapping; never open controls or user-facing fallback.
- Reuse unambiguous answers. Otherwise freeze scope, map labels/aliases to canonical values; one pending decision per workflow. Bind through host identity or an unambiguous conversational answer for the sole unchanged decision; ambiguity requires visible key.
- Inspect directly exposed tools and schemas/restrictions; discover deferred
ask_userwith tool search orfunctions.execALL_TOOLSbefore async. Prefer permitted synchronousrequest_user_inputwhen choices fit, otherwise invoke native form. Async needs verified usable control; unknown means unsuitable. Printing payload is not asking. Tool acceptance does not prove a selectable form was rendered. - Show context once; the selected control owns question/choices, never print them before or after it. Closed choices use distinct actionable options, evidence-backed
(Recommended)first. Open syntax needs free text and complete grammar;ask_useromits options. Preserve every required action. Never inventOther/Customor force two presets. - Explain approval/denial effects; use
Approve/Denyor exact action labels. Preapproval brief is context: missing required consent uses native control; existing consent skips reconfirmation. Runtime permission uses dedicated runtime mechanism, never question tools. - Bind answers to frozen scope; verify
ask_userdecision ID/digest before consuming answered receipt. Unsupported, cancelled or declined forms grant no consent. Required work stays pending. Tool acceptance, silence, preselection, examples and unrelated text grant no consent. Idle accepted async: yield without final/status, including empty final. Clear Approve/Deny binds one unchanged decision; supersession/exact-token rules remain. Optional defaults require permission, response opportunity and stated assumption. Never replay completed decisions. - Use plain text when no form works or the host requires it; explain why; ask once, question/options last. Dismissal makes that control unsuitable; details cover host-contract evidence. Async text stays pending for typed reply. No widget probes or settings changes.
For exact-token/digest confirmation, uncertain binding, changed scope, delayed answers, resumption, control failure, or text/headless fallback, read detailed rules. Keep decisions pending while resolving uncertainty.