GPT-5.5 Prompt Writer
Write one prompt that a GPT-5.5 session can execute with minimal ambiguity. Optimize for outcome, action, persistence, and verification, not for prose elegance.
Read references/openai-gpt-5-5-prompting.md when the task is long-horizon, tool-heavy, or expensive enough that prompt quality materially matters.
Workflow
- Capture the real task.
- Identify the execution environment (Codex CLI, Responses API, Agents SDK, custom harness).
- Define hard constraints and done criteria.
- Decide which Codex-style XML blocks the task actually needs.
- Write the prompt as block-structured XML with an outcome-first task statement.
- Add a verification loop and completeness contract for execution prompts.
- Recommend
reasoning.effort and text.verbosity deliberately.
- Remove vague or contradictory instructions.
Capture The Real Task
Before drafting, extract:
- The objective: what must be changed, fixed, implemented, or reviewed.
- The environment: repo path, branch, services, runtime, tools available, secrets assumptions.
- The constraints: files or systems that must not be touched, style rules, required docs, approval limits.
- The validation surface: tests, build, lint, integration suites, smoke checks, manual verification, or whatever the project actually uses. Let the user name their own checks.
- The completion rule: what must be true before GPT-5.5 may stop.
If the user supplied a spec or earlier review findings, turn those into explicit required work items in <task>. Do not leave them implicit.
Prompt Shape
GPT-5.5 prompts compose from named XML blocks. Use only the blocks the task needs.
Core wrapper:
<task> — the concrete job, the relevant repo or failure context, and the expected end state.
Output and format:
<structured_output_contract> — exact response shape and ordering.
<compact_output_contract> — concise prose contract when no schema applies.
Follow-through and completion:
<default_follow_through_policy> — when to act vs ask.
<completeness_contract> — finish the job, do not stop at first plausible answer.
<verification_loop> — verify result before finalizing, fix and rerun if a check fails.
Grounding:
<missing_context_gating> — do not guess; retrieve or state what is unknown.
<grounding_rules> — anchor every claim to context or tool output, label inferences.
<citation_rules> — back claims with primary sources where research applies.
Safety and tool use:
<action_safety> — keep changes tightly scoped, flag risky actions.
<tool_persistence_rules> — keep using tools until enough evidence to finish.
Task-specific:
<research_mode> — separate facts, inferences, open questions.
<dig_deeper_nudge> — check for second-order failures before finalizing.
<progress_updates> — brief, outcome-based progress for long runs.
Use short imperative bullets inside each block. Keep the prompt concrete.
Model-Specific Rules
Apply these GPT-5.5-specific patterns:
- Outcome-first. Describe the destination, not every step. GPT-5.5 picks better paths than micromanaged hidden algorithms.
- Literal instruction following. GPT-5.5 interprets prompts in a literal and thorough manner, so define success criteria explicitly. Replace "ALWAYS X, THEN Y" absolutes with decision rules: "If X, do Y; otherwise Z."
- Reasoning effort. Recommend
reasoning.effort: "medium" as the interactive coding default. Use "low" for latency-sensitive work where some thinking still helps. Reserve "high" or "xhigh" for complex agentic tasks where evals show measurable gains. Use "none" only for fast, no-reasoning paths (classification, voice). Higher effort is not automatically better; tighten the prompt before raising effort.
- Verbosity. Recommend
text.verbosity: "low" for code agents and concise responses; the API default "medium" is often too long. Specify word budgets, section counts, or JSON-only when strictness matters.
- Bias to action. "Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes." Add this verbatim to long-horizon coding prompts.
- Tool preference. Prefer dedicated tools over raw shell (e.g.,
apply_patch, rg, read_file, list_dir, update_plan) for Codex runs. Parallelize independent tool reads.
- Planning. For medium-or-larger tasks in Codex, instruct the model to maintain a plan via
update_plan. Skip planning for trivial tasks. Before finishing, reconcile every plan item — Done, Blocked, or Cancelled. Never leave items in-progress.
- Structured outputs. Do not describe schemas in prose. Use the Structured Outputs API for validation. Tell the model to "return exactly the requested output shape and nothing else."
- Prompt caching. Place static content first, dynamic content last. Use
prompt_cache_key consistently for repeated traffic. Track usage.prompt_tokens_details.cached_tokens.
- No assumed tech stack. Use what the user named. If the user did not mention Docker, do not write "Start local Docker services". The validation block must reflect their stack, not a default one.
Execution Loop
For long-running coding prompts, include a loop in the prompt:
- Read the relevant repo instructions and source files first.
- Build a concrete implementation plan from the actual code, not assumptions.
- Make the smallest correct change set that resolves the required items.
- Run the required validations.
- If validation fails, fix the cause and rerun until green or until blocked by a real external dependency.
- Reconcile every plan item before finishing.
- Do not stop at partial implementation or analysis-only output.
Validation Rules
Name the exact commands and required services. Good prompts do not say "test thoroughly"; they say exactly what must run.
For tasks with local infrastructure, spell out startup expectations using whatever the project actually uses, named by the user, not assumed:
- Start any required services (databases, queues, container runtimes, dev servers).
- Apply any required schema or data migrations.
- Start any worker or background processes the workflow depends on.
- Run end-to-end or browser checks only against the correct local environment.
If the prompt requires running multiple services or end-to-end checks, say that success is not complete until those paths have been exercised and any failures addressed or reported with evidence.
Template
<task>
You are an autonomous senior engineer working in {{repo_path}} on branch {{branch}}.
Implement the required work items end-to-end and validate them.
Required work items:
- {{item_1}}
- {{item_2}}
Relevant files and docs:
- {{file_or_doc_1}}
- {{file_or_doc_2}}
Tech stack: {{stack_named_by_user}}.
</task>
<default_follow_through_policy>
Default to the most reasonable low-risk interpretation and keep going.
Only stop to ask when a missing detail changes correctness, safety, or an irreversible action.
</default_follow_through_policy>
<completeness_contract>
Persist until the task is fully handled end-to-end within the current turn whenever feasible.
Do not stop at analysis or partial fixes.
Treat the task as incomplete until every required item is covered or explicitly marked [blocked] with evidence.
Before finishing, reconcile every plan item: Done, Blocked, or Cancelled. Never leave items in-progress.
</completeness_contract>
<tool_persistence_rules>
Prefer dedicated tools over raw shell (apply_patch, rg, read_file, list_dir, update_plan).
Parallelize independent reads; sequence dependent ones.
After parallel retrieval, synthesize before the next batch.
Keep using tools until you have enough evidence to finish confidently.
</tool_persistence_rules>
<verification_loop>
Required validations:
- {{command_1}}
- {{command_2}}
- {{service_or_environment_named_by_user}}
Before finalizing, run the required validations.
If a check fails, fix the cause and rerun until green or a real external blocker remains.
</verification_loop>
<missing_context_gating>
Do not guess missing repository facts.
Retrieve with tools, or state exactly what remains unknown.
</missing_context_gating>
<action_safety>
Keep changes tightly scoped to the stated task.
Avoid unrelated refactors, renames, or cleanup unless required for correctness.
Do not run destructive git commands (reset --hard, checkout --) without explicit approval.
No broad try/catch; propagate errors explicitly. No `as any` or type assertions in place of real types.
</action_safety>
<structured_output_contract>
Final report:
1. what changed (per file, one line each)
2. what validations ran and their outcomes
3. residual risks or follow-ups
Keep it compact. Highest-value findings first.
</structured_output_contract>
Suggested API or CLI configuration:
model: "gpt-5.5"
reasoning.effort: "medium" (use "high" only if evals show measurable gains)
text.verbosity: "low"
- Use the Responses API for reasoning, tool-calling, and multi-turn workflows.
- For Codex CLI: run with
codex exec for non-interactive automated runs (or just codex for an interactive TUI session) and let the harness manage tools and planning.
Anti-Patterns
Avoid these prompt mistakes:
- Vague goals with no acceptance criteria.
- Step-by-step micromanagement when the path does not actually matter — use outcome-first instead.
- Absolute commands ("ALWAYS", "NEVER") for judgment calls — use decision rules.
- Asking for persistence without naming the validation loop.
- Asking for tool use only indirectly when tool use is actually required.
- Overstuffing the prompt with background that does not change execution.
- Mixing contradictory instructions like "be extremely proactive" and "only use tools when absolutely necessary" without task-specific guidance.
- Letting the model decide whether validation matters.
- Raising
reasoning.effort to compensate for a weak prompt — overthinking is real on GPT-5.5.
Final Check
Before returning a prompt, verify that it:
- names the exact implementation scope inside
<task>
- names the exact validation commands inside
<verification_loop>
- names any required services or environments and how to start them, in the user's stack only
- includes
<completeness_contract> for execution work
- includes
<missing_context_gating> whenever guessing would be costly
- replaces absolute commands with decision rules where appropriate
- recommends a deliberate
reasoning.effort and text.verbosity
- does not stuff schema descriptions in prose when Structured Outputs would do the job
- tells GPT-5.5 what counts as done
- uses no tech-stack names the user did not mention
1---2name: gpt-5-5-prompt-writer3description: Write or refine prompts specifically for GPT-5.5, including Codex CLI runs and Responses API agentic workflows. Use when Claude or another harness needs a high-performance OpenAI-style GPT-5.5 prompt with reasoning.effort, text.verbosity, XML block contracts, persistence, decision rules, completeness contracts, verification loops, tool-use parallelism, and outcome-first acceptance criteria.4---56# GPT-5.5 Prompt Writer78Write one prompt that a GPT-5.5 session can execute with minimal ambiguity. Optimize for outcome, action, persistence, and verification, not for prose elegance.910Read [references/openai-gpt-5-5-prompting.md](references/openai-gpt-5-5-prompting.md) when the task is long-horizon, tool-heavy, or expensive enough that prompt quality materially matters.1112## Workflow13141. Capture the real task.152. Identify the execution environment (Codex CLI, Responses API, Agents SDK, custom harness).163. Define hard constraints and done criteria.174. Decide which Codex-style XML blocks the task actually needs.185. Write the prompt as block-structured XML with an outcome-first task statement.196. Add a verification loop and completeness contract for execution prompts.207. Recommend `reasoning.effort` and `text.verbosity` deliberately.218. Remove vague or contradictory instructions.2223## Capture The Real Task2425Before drafting, extract:2627- The objective: what must be changed, fixed, implemented, or reviewed.28- The environment: repo path, branch, services, runtime, tools available, secrets assumptions.29- The constraints: files or systems that must not be touched, style rules, required docs, approval limits.30- The validation surface: tests, build, lint, integration suites, smoke checks, manual verification, or whatever the project actually uses. Let the user name their own checks.31- The completion rule: what must be true before GPT-5.5 may stop.3233If the user supplied a spec or earlier review findings, turn those into explicit required work items in `<task>`. Do not leave them implicit.3435## Prompt Shape3637GPT-5.5 prompts compose from named XML blocks. Use only the blocks the task needs.3839Core wrapper:4041- `<task>` — the concrete job, the relevant repo or failure context, and the expected end state.4243Output and format:4445- `<structured_output_contract>` — exact response shape and ordering.46- `<compact_output_contract>` — concise prose contract when no schema applies.4748Follow-through and completion:4950- `<default_follow_through_policy>` — when to act vs ask.51- `<completeness_contract>` — finish the job, do not stop at first plausible answer.52- `<verification_loop>` — verify result before finalizing, fix and rerun if a check fails.5354Grounding:5556- `<missing_context_gating>` — do not guess; retrieve or state what is unknown.57- `<grounding_rules>` — anchor every claim to context or tool output, label inferences.58- `<citation_rules>` — back claims with primary sources where research applies.5960Safety and tool use:6162- `<action_safety>` — keep changes tightly scoped, flag risky actions.63- `<tool_persistence_rules>` — keep using tools until enough evidence to finish.6465Task-specific:6667- `<research_mode>` — separate facts, inferences, open questions.68- `<dig_deeper_nudge>` — check for second-order failures before finalizing.69- `<progress_updates>` — brief, outcome-based progress for long runs.7071Use short imperative bullets inside each block. Keep the prompt concrete.7273## Model-Specific Rules7475Apply these GPT-5.5-specific patterns:7677- **Outcome-first.** Describe the destination, not every step. GPT-5.5 picks better paths than micromanaged hidden algorithms.78- **Literal instruction following.** GPT-5.5 interprets prompts in a literal and thorough manner, so define success criteria explicitly. Replace "ALWAYS X, THEN Y" absolutes with decision rules: "If X, do Y; otherwise Z."79- **Reasoning effort.** Recommend `reasoning.effort: "medium"` as the interactive coding default. Use `"low"` for latency-sensitive work where some thinking still helps. Reserve `"high"` or `"xhigh"` for complex agentic tasks where evals show measurable gains. Use `"none"` only for fast, no-reasoning paths (classification, voice). Higher effort is not automatically better; tighten the prompt before raising effort.80- **Verbosity.** Recommend `text.verbosity: "low"` for code agents and concise responses; the API default `"medium"` is often too long. Specify word budgets, section counts, or JSON-only when strictness matters.81- **Bias to action.** "Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes." Add this verbatim to long-horizon coding prompts.82- **Tool preference.** Prefer dedicated tools over raw shell (e.g., `apply_patch`, `rg`, `read_file`, `list_dir`, `update_plan`) for Codex runs. Parallelize independent tool reads.83- **Planning.** For medium-or-larger tasks in Codex, instruct the model to maintain a plan via `update_plan`. Skip planning for trivial tasks. Before finishing, reconcile every plan item — Done, Blocked, or Cancelled. Never leave items in-progress.84- **Structured outputs.** Do not describe schemas in prose. Use the Structured Outputs API for validation. Tell the model to "return exactly the requested output shape and nothing else."85- **Prompt caching.** Place static content first, dynamic content last. Use `prompt_cache_key` consistently for repeated traffic. Track `usage.prompt_tokens_details.cached_tokens`.86- **No assumed tech stack.** Use what the user named. If the user did not mention Docker, do not write "Start local Docker services". The validation block must reflect their stack, not a default one.8788## Execution Loop8990For long-running coding prompts, include a loop in the prompt:91921. Read the relevant repo instructions and source files first.932. Build a concrete implementation plan from the actual code, not assumptions.943. Make the smallest correct change set that resolves the required items.954. Run the required validations.965. If validation fails, fix the cause and rerun until green or until blocked by a real external dependency.976. Reconcile every plan item before finishing.987. Do not stop at partial implementation or analysis-only output.99100## Validation Rules101102Name the exact commands and required services. Good prompts do not say "test thoroughly"; they say exactly what must run.103104For tasks with local infrastructure, spell out startup expectations using whatever the project actually uses, named by the user, not assumed:105106- Start any required services (databases, queues, container runtimes, dev servers).107- Apply any required schema or data migrations.108- Start any worker or background processes the workflow depends on.109- Run end-to-end or browser checks only against the correct local environment.110111If the prompt requires running multiple services or end-to-end checks, say that success is not complete until those paths have been exercised and any failures addressed or reported with evidence.112113## Template114115```xml116<task>117You are an autonomous senior engineer working in {{repo_path}} on branch {{branch}}.118Implement the required work items end-to-end and validate them.119120Required work items:121- {{item_1}}122- {{item_2}}123124Relevant files and docs:125- {{file_or_doc_1}}126- {{file_or_doc_2}}127128Tech stack: {{stack_named_by_user}}.129</task>130131<default_follow_through_policy>132Default to the most reasonable low-risk interpretation and keep going.133Only stop to ask when a missing detail changes correctness, safety, or an irreversible action.134</default_follow_through_policy>135136<completeness_contract>137Persist until the task is fully handled end-to-end within the current turn whenever feasible.138Do not stop at analysis or partial fixes.139Treat the task as incomplete until every required item is covered or explicitly marked [blocked] with evidence.140Before finishing, reconcile every plan item: Done, Blocked, or Cancelled. Never leave items in-progress.141</completeness_contract>142143<tool_persistence_rules>144Prefer dedicated tools over raw shell (apply_patch, rg, read_file, list_dir, update_plan).145Parallelize independent reads; sequence dependent ones.146After parallel retrieval, synthesize before the next batch.147Keep using tools until you have enough evidence to finish confidently.148</tool_persistence_rules>149150<verification_loop>151Required validations:152- {{command_1}}153- {{command_2}}154- {{service_or_environment_named_by_user}}155Before finalizing, run the required validations.156If a check fails, fix the cause and rerun until green or a real external blocker remains.157</verification_loop>158159<missing_context_gating>160Do not guess missing repository facts.161Retrieve with tools, or state exactly what remains unknown.162</missing_context_gating>163164<action_safety>165Keep changes tightly scoped to the stated task.166Avoid unrelated refactors, renames, or cleanup unless required for correctness.167Do not run destructive git commands (reset --hard, checkout --) without explicit approval.168No broad try/catch; propagate errors explicitly. No `as any` or type assertions in place of real types.169</action_safety>170171<structured_output_contract>172Final report:1731. what changed (per file, one line each)1742. what validations ran and their outcomes1753. residual risks or follow-ups176Keep it compact. Highest-value findings first.177</structured_output_contract>178```179180Suggested API or CLI configuration:181182- `model: "gpt-5.5"`183- `reasoning.effort: "medium"` (use `"high"` only if evals show measurable gains)184- `text.verbosity: "low"`185- Use the Responses API for reasoning, tool-calling, and multi-turn workflows.186- For Codex CLI: run with `codex exec` for non-interactive automated runs (or just `codex` for an interactive TUI session) and let the harness manage tools and planning.187188## Anti-Patterns189190Avoid these prompt mistakes:191192- Vague goals with no acceptance criteria.193- Step-by-step micromanagement when the path does not actually matter — use outcome-first instead.194- Absolute commands ("ALWAYS", "NEVER") for judgment calls — use decision rules.195- Asking for persistence without naming the validation loop.196- Asking for tool use only indirectly when tool use is actually required.197- Overstuffing the prompt with background that does not change execution.198- Mixing contradictory instructions like "be extremely proactive" and "only use tools when absolutely necessary" without task-specific guidance.199- Letting the model decide whether validation matters.200- Raising `reasoning.effort` to compensate for a weak prompt — overthinking is real on GPT-5.5.201202## Final Check203204Before returning a prompt, verify that it:205206- names the exact implementation scope inside `<task>`207- names the exact validation commands inside `<verification_loop>`208- names any required services or environments and how to start them, in the user's stack only209- includes `<completeness_contract>` for execution work210- includes `<missing_context_gating>` whenever guessing would be costly211- replaces absolute commands with decision rules where appropriate212- recommends a deliberate `reasoning.effort` and `text.verbosity`213- does not stuff schema descriptions in prose when Structured Outputs would do the job214- tells GPT-5.5 what counts as done215- uses no tech-stack names the user did not mention