Skip to content

Conversation

@4erdenko
Copy link

Summary

With gpt-5.2 (especially at higher reasoning effort), Codex CLI can emit a short progress/preamble message (e.g. “Next, I’ll …”) and then yield back to the user without emitting any tool calls. Because the CLI only continues an agent turn when tool calls are emitted, this stalls multi-step work and forces manual “continue” nudges.

This PR updates the GPT-5.2 (and GPT-5.1 for parity) system prompts to explicitly forbid “dangling” preambles and require issuing tool calls in the same assistant turn.

Problem

Observed behavior:

  • The agent prints a preamble like “Ok, now I’ll run … / Next, I’ll …”
  • No tool call follows
  • The turn ends and control returns to the user mid-task

Expected:

  • If the agent says it will run a command/apply a patch, it should immediately emit the tool call(s) in the same response (or ask the user directly if input/approval is required).

Root cause (why this happens)

Codex CLI’s agent loop continues a turn only when the model emits tool calls. Pure text updates are treated as “end of turn”.

The current GPT-5.x prompt strongly encourages short “next I’ll …” style progress updates, but doesn’t clearly state that such preambles must not be a standalone turn. gpt-5.2 sometimes treats the preamble as a separate phase and stops before emitting tool calls.

This appears consistent with a broader class of similar “agent stops while it still has a plan” issues, and matches recent reports specifically for v0.71.0 + GPT‑5.2.

Changes

  • codex-rs/core/gpt_5_2_prompt.md: clarify “heads-down” guidance and add an explicit rule to avoid standalone preambles and to emit tool calls immediately in the same response.
  • codex-rs/core/gpt_5_1_prompt.md: mirror the same clarification to keep behavior consistent across GPT-5.1 and GPT-5.2.

Related issues

Fixes #7900
Related: #5264, #6277

Test plan

N/A (prompt-only change)

Notes

Updated the guidelines for heads-down notes to emphasize that
tool calls should immediately follow any preamble. This change
ensures that users do not leave dangling updates and maintain
a clear flow in their interactions.
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@4erdenko
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPT-5.2 not clearly prompted they shouldn't end conversation turn for tool preambles.

1 participant