Skip to content

fix(prompt-engineer): don't ask for <thinking> tags on models with native extended thinking - #1023

Open
vidaunited wants to merge 1 commit into
msitarzewski:mainfrom
vidaunited:fix/prompt-engineer-native-thinking
Open

vidaunited wants to merge 1 commit into
msitarzewski:mainfrom
vidaunited:fix/prompt-engineer-native-thinking

Conversation

@vidaunited

Copy link
Copy Markdown

What

engineering/engineering-prompt-engineer.md tells the agent (line 45, in the example system prompt) to "think step-by-step inside <thinking> tags", and lists <thinking> → <answer> scaffolds as its reasoning-chain technique (line 163).

On models with native extended thinking (Claude 4 and later), that instruction is counter-productive: the model already reasons before answering, and a <thinking> scratchpad asked for in the prompt duplicates that reasoning and lands in the visible output — longer responses, and the "thinking" leaks to end users unless every caller strips the tags.

Change

Two lines, no structural change:

  • The example prompt now says: reason before answering; on native-thinking models enable thinking in the API call and do not ask for <thinking> tags; use <answer> only when a downstream parser needs the delimiter.
  • The technique bullet keeps the <thinking> → <answer> scaffold, scoped to models that do not have native thinking.

Why it matters for this repo

The agent is the one users reach for to write other agents' prompts, so the pattern propagates. Anthropic's extended-thinking docs recommend against prompting for a scratchpad when thinking is enabled for exactly this reason.

TheRealVitja pushed a commit to TheRealVitja/agency-agents that referenced this pull request Oct 6, 2026
…nts)

Curated sync of the open upstream pull requests as of 2026-10-06:

- Script and CI fixes: msitarzewski#1055, msitarzewski#1030, msitarzewski#865, msitarzewski#860, msitarzewski#967, msitarzewski#870, msitarzewski#869, msitarzewski#889,
  msitarzewski#1056, msitarzewski#755, msitarzewski#868, msitarzewski#771, msitarzewski#867; ported msitarzewski#523, msitarzewski#512 and the permissions
  part of msitarzewski#790.
- Existing-agent fixes: msitarzewski#1033-msitarzewski#1052, msitarzewski#1053, msitarzewski#1054, msitarzewski#1023, msitarzewski#756-msitarzewski#759, msitarzewski#799,
  msitarzewski#805, msitarzewski#715, msitarzewski#752, msitarzewski#784, msitarzewski#793, msitarzewski#858, msitarzewski#812, msitarzewski#789, msitarzewski#1007.
- New agents: msitarzewski#702, msitarzewski#707, msitarzewski#731, msitarzewski#732, msitarzewski#764, msitarzewski#848, msitarzewski#859, msitarzewski#862, msitarzewski#863, msitarzewski#886,
  msitarzewski#908, msitarzewski#982-msitarzewski#985, msitarzewski#1031, msitarzewski#1032.
- Docs: msitarzewski#577, msitarzewski#743, msitarzewski#762, msitarzewski#785, msitarzewski#786, msitarzewski#815, msitarzewski#816.

Fixes found while integrating: Bash 3.2 guard for the msitarzewski#755 worker argv,
Windsurf re-conversion over a stale .windsurfrules, locale-independent
check-divisions.sh, agency- prefix handling in the outputs eval, and the
India Business Navigator's YAML and headings. Resolves upstream issues
msitarzewski#229, msitarzewski#763, msitarzewski#821 and msitarzewski#1027.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NwgfpJ9tGbUh5g84u5VSgv
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.

1 participant