Almost every prompting technique you have read about was developed for single-turn chat, then assumed to transfer. This lesson starts somewhere else: with five shipping agent prompts, cloned and counted. Their system prompts differ by a factor of 109, and nothing at all appears in every one of them.
There is a genre of advice about agent prompts. Give it a persona. Tell it to think step by step. Offer it a tip. Most of it comes from chat, where a prompt gets one turn to work.
An agent prompt does not get one turn. It gets thirty, alongside tool results it did not predict, and it has to still be steering on turn twenty-nine. That is a different job.
So rather than argue about it, I cloned five agents people actually run and counted what is in them.
Read the top row first. These are shipping agents, not examples, and their system prompts differ by a factor of 109. The rows underneath answer the next question — what do they agree on? — and the answer is that nothing here appears in all five. Measured 2 September 2026 at the commit shown.
You are a helpful assistant that can interact with a computer to solve tasks.
The whole system prompt is that one sentence. Fourteen words, no persona to speak of, no rules. Every actual instruction lives in the per-task message: the uploaded repository, the PR description, and the demand for minimal changes to non-test files. This is the system that defined the SWE-bench agent category, and it puts almost nothing in the system prompt.
plus a 204-word per-task message, which is where its instructions live
Counts are of the named constant in each file, so they understate four of the five: those prompts are assembled at run time from templates, injected tool lists and per-extension instructions. That is the finding, not a footnote.
Start with the number that should end most arguments. SWE-agent’s entire system prompt is fourteen words: a helpful assistant that can interact with a computer to solve tasks. No persona, no rules, no examples.
smolagents runs 1,526 words for the same broad job. That is 109 times longer. Both ship. Both work.
Anyone telling you the correct length or shape of an agent system prompt is describing their own agent. The variance between working systems is larger than the advice admits.
The difference is not taste, though. SWE-agent puts its instructions in the per-task message instead — 204 words of repository, problem statement and constraints, rebuilt for every task. Its system prompt is short because almost nothing about its job is constant.
smolagents is long for the opposite reason. It is a library aimed at many models, including weak ones, so it spends its budget on worked examples that pin down the output format. Both are answers to the question of what is stable across your runs and what is not.
Here is the thing that surprised me most in the measurement. For four of the five, you cannot point at the prompt. It does not exist until run time.
Aider is the clearest case. Its main system text is 181 words, but that is one of nine named constants across two modules. A separate reminder adds 354 more. Others carry file context, a laziness reminder and an over-eagerness reminder. Ask what Aider’s system prompt says and the honest answer is: it depends what you asked it to do.
Goose goes further. Its prompt file is mostly template logic, and each enabled extension injects its own instructions. It even warns the model about its own assembly, saying the conversation history may refer to extensions that are no longer active.
Treat this as a design instruction rather than a curiosity. If your prompt is a single hardcoded string, every capability you add makes it longer for every run, including the runs that will never use that capability.
def build_system_prompt(enabled_tools, task_type):
"""Assemble, don't concatenate. Order matters more than wording here."""
parts = [
BASE, # identical on every run — the cache prefix
STOP_CONDITION, # what "finished" means, and what to do if stuck
]
# Capability text only when the capability is actually loaded. A rule about
# refunds costs tokens on a billing question and can mislead on one.
for t in enabled_tools:
if t.prompt_fragment:
parts.append(t.prompt_fragment)
parts.append(PROCEDURES[task_type])
# Volatile values LAST. A timestamp near the top invalidates everything
# after it on every single request.
parts.append(f"Current date: {today()}")
return "\n\n".join(parts)Now the part that changes what you write. Someone has actually tested most of the advice, and the results are not kind to it.
Every verdict is attached to a source that was read, not to an opinion. Three of the eight do nothing at all, two have reversed since they were written down, and the technique with the best evidence is the one nobody blogs about.
Real, and much narrower than its reputation. Averaged over 100+ papers and 20 datasets, chain-of-thought adds 14.2 points on symbolic reasoning, 12.3 on maths and 6.9 on logic. On everything else it moves 56.1 to 56.8, which the authors decline to call a victory. The line to remember: as much as 95% of its entire gain on MMLU comes from questions containing an equals sign. If your agent is not doing arithmetic, this is not your lever.
Sprague et al., ICLR 2025
Two honest limits. Almost all of this evidence is from single-turn benchmarks, because a study that varies only the prompt while holding an agent scaffold fixed is a gap in the literature rather than a thing you can look up. And a null result on a benchmark subset is weaker than it looks. Treat these as bounds on the technique, not proof about your task.
Three of those deserve saying out loud. Start with chain of thought, because it is the most copied instruction in the business.
It works, and it is much narrower than its reputation. Across a meta-analysis of over 100 papers, it adds 14.2 points on symbolic reasoning and 12.3 on maths. On everything else it moves 56.1 to 56.8. The authors decline to call that a victory.
The detail that should end the habit: as much as 95% of its entire gain on one benchmark came from questions containing an equals sign. If your agent files refunds rather than solving equations, this is not your lever.
Next, the persona. Two of the five prompts measured above open by casting the model as an expert. Tested across 162 roles and 2,410 questions, adding a persona did not improve performance at all. Picking the best one after the fact helps. Choosing one in advance is no better than random.
Then the folklore. Tips, threats and appeals to your career have now been run properly, at nearly five thousand trials per prompt per model. No significant effect. They do move individual questions around, unpredictably and in both directions, which is worse than nothing — because it looks like a result.
Meanwhile the technique with the strongest evidence is the one nobody writes threads about. Formatting. Separators, spacing and casing alone move accuracy by a median of 7.5 points, and by up to 76 on one model. Deleting two colons took one task from 0.043 to 0.826.
If you want one story that settles whether prompts are production code, it is this one, and it is a vendor’s own postmortem about its own agent.
Anthropic added two sentences to Claude Code’s system prompt, capping text between tool calls at 25 words and final responses at 100. It shipped after several weeks of internal testing with no regressions on the evals they ran.
Users reported the agent had got worse. That was hard to separate from normal variation at first, and neither internal usage nor the existing evals reproduced it.
What found it was ablation — removing the prompt one line at a time, against a broader eval set. One evaluation showed a 3% drop. The prompt was reverted four days later.
Take the technique, not just the anecdote. Treat every line of a system prompt as an independently testable unit. If you cannot say what a line is worth, you cannot say whether removing it would help — and on current models, removing lines is increasingly the upgrade.
Of the five signals I tested for, the most commonly missing was a stopping condition. Three prompts have one. Two say nothing about when the run is over.
Cline’s is the sharpest, and it is worth copying the shape rather than the words. A response with no tool calls is treated as the final answer. That is a stop condition the harness can actually check, not a hope.
The distinction matters. “Stop when you have finished” is a request, and a model that believes it is nearly there will keep going. A stopping rule the loop can evaluate is a guarantee.
Write both. The prompt says what finished looks like, and it says what to do when the agent cannot get there — escalate, return partial work, say plainly that it failed. Then the harness caps the turns regardless, because a sentence has never stopped a loop.
Notice which two prompts tell the model to ask rather than assume. Both are coding agents that sit beside a human in an editor. An agent running unattended at 3am has nobody to ask, so that instruction is a product decision before it is a prompting one — and copying it into an unattended agent produces one that stalls politely instead of escalating.
Nubank’s KDD paper is unusual because it measures prompts instead of describing them, and its sharpest result is a failure of their own. On one evaluator, the hand-written starter prompt scored 68.9 where simply guessing the majority class scored 77.8. A careful, expert-written prompt did worse than no prompt at all. Optimisation recovered it to 88.9.
Their reading is worth quoting because it names the mechanism: human-written instructions may “inadvertently introduce noise or bias that contradicts the underlying task distribution”. And look at what happened to agreement between different judge models — from 0.11 to 0.95. The unoptimised prompt was so ambiguous that one model assigned every single case to the same class. Now notice what they optimised: the evaluators, not the agent. The customer-facing prompts were still written by people, through human-in-the-loop iteration. The machine was pointed at the measuring instrument.
One of these is a “must” at every stage, which is unusual in this curriculum. It is also the one two of the five measured prompts skip.
Nearly all guidance on this topic is written for one company size and then read by everyone. Pick yours — the list re-sorts, and what you should deliberately not build drops to the bottom.
Text in the prompt saying what finished looks like, and what to do when the agent cannot get there.
At this stage · Now paired with a hard turn cap in the harness, because a sentence is a request and a loop bound is a guarantee.
The prompt as a reviewed file with a history, rather than a string literal edited in place.
At this stage · Now with the reason for each rule recorded beside it. Rules accumulate, and nobody dares delete one whose purpose is unrecorded.
The same regression set fired by a prompt edit, not only by a code or model change.
At this stage · Wired into CI on the prompt file itself. Prompt edits are the highest-frequency change in an agent and usually the least tested.
Full input-to-output traces showing the exact shape you want back.
At this stage · Keep them, but count them. They are paid for on every single turn of every single run, and three of the five prompts measured here carry none.
Treating a model upgrade as a prompt migration rather than a configuration change.
At this stage · Budget half a day per model change, spent on what the evals flag rather than on a rewrite from scratch.
Nothing is optional at this stage. That is itself the finding — the cost of the control set is part of the cost of operating here.
Five shipping agents span 14 to 1,526 words, and four build the prompt at run time rather than storing one. SWE-agent's instructions live in the per-task message because almost nothing about its job is constant. Ask which of your instructions are the same on every run — those are the system prompt, and the rest is task text.
The most commonly missing piece: two of five say nothing about when the run is over. 'Stop when finished' is a request. 'A response with no tool calls is the final answer' is a rule the harness can evaluate — and cap the turns anyway.
Personas tested across 162 roles and 2,410 questions: no gain. Tips and threats at ~5,000 runs per prompt: no significant effect. Chain of thought is real but concentrated — 14.2 points on symbolic tasks, 0.7 everywhere else. Meanwhile formatting alone moves a median 7.5 points and nobody talks about it.
Two sentences added to Claude Code's system prompt cost 3% on an eval and shipped past several weeks of testing. Line-level ablation is what found it. On current models the upgrade is often deleting a line rather than rewriting one.
Primary sources wherever one exists. Where a claim is contested or vendor-reported, the lesson says so at the point it is made.
Gupta et al., peer-reviewed at KDD ’26. The rare production paper that measures prompts rather than describing them. Its sharpest result is a negative one: on evaluator E2 the hand-written starter prompt “degraded performance to 68.88, performing worse than the majority-class baseline”, which they read as showing “the risks inherent in manual prompt engineering, where human-written instructions may inadvertently introduce noise or bias”. Optimisation recovered it to 88.89. Note what was optimised — the LLM judges, not the customer-facing agent, whose prompts came from “systematic human-in-the-loop prompt iteration”.
Agrawal et al., Berkeley/Stanford/Databricks. Strong results — “GEPA outperforms GRPO by 6% on average and by up to 20%, while using up to 35x fewer rollouts” — with a caveat that decides whether it applies to you. The six tasks are multi-hop QA, maths, instruction following, privacy-aware delegation and retrieval verification. None is a tool-using agent benchmark. The mechanism samples tool calls; the evaluation does not test them.
Sprague et al., peer-reviewed at ICLR 2025. A meta-analysis of over 100 papers plus their own runs on 20 datasets and 14 models, and the best effect-size breakdown available. “The three categories which benefited the most from CoT are symbolic reasoning, math, and logical reasoning, with average improvements of 14.2, 12.3, 6.9.” Everywhere else: “the average performance with CoT was 56.8, compared to 56.1 without CoT. We do not consider this small improvement a victory for CoT.” The memorable one: “As much as 95% of the total performance gain from CoT on MMLU is attributed to questions containing ‘=’.” Single-turn benchmarks, so it bounds the technique rather than testing agent loops.
Zheng, Pei, Logeswaran, Lee and Jurgens, peer-reviewed. 162 roles across six relationship types and eight expertise domains, 2,410 factual questions, four model families. The result: “adding personas in system prompts does not improve model performance across a range of questions compared to the control setting where no persona is added.” Picking a good persona after the fact helps, but choosing one in advance is “no better than random selection” — so “the effect of each persona can be largely random”. One of the five agents measured on this page opens with a persona line.
Sclar, Choi, Tsvetkov and Suhr, peer-reviewed at ICLR 2024. Formatting alone — separators, spacing, casing — moves accuracy by “up to 76 accuracy points” on LLaMA-2-13B, with a median spread of 7.5 points across tasks. Their worked example is deleting two colons: “passage:{} answer: {}” scores 0.043 and “passage {} answer {}” scores 0.826. They also find formats do not transfer: if one format beats another on model M, there is under 0.62 probability the order holds on model M′, against 0.5 for chance.
Meincke, Mollick, Mollick and Shapiro, 1 August 2025. An arXiv preprint, but a well-powered one: nine prompt conditions including tips of a thousand and a trillion dollars, career appeals and explicit threats, over GPQA Diamond at 4,950 runs per prompt per model. “Threatening or tipping a model generally has no significant effect on benchmark performance.” The nuance that matters for agents: “Prompt variations can significantly affect performance on a per-question level. However, it is hard to know in advance whether a particular prompting approach will help or harm.”
Vaugrante, Niepert and Hagendorff. An arXiv preprint, and the null results on small benchmark subsets may be underpowered — but one part stands on arithmetic alone. EmotionPrompt reported a “relative performance improvement of 115%”; recomputing from the original paper’s own published numbers, without cherry-picking the best emotional cue, gives “a 2.58% relative performance improvement across all benchmarks”. Expert-persona prompting reproduced at “an average improvement of only 1%”. They also failed to replicate zero-shot chain-of-thought gains entirely.
Kapoor, Stroebl, Narayanan et al., Princeton/Stanford/Berkeley. 21,730 agent rollouts across nine models and nine benchmarks at roughly $40,000 of compute. The finding that belongs in this lesson: “higher reasoning effort reducing accuracy in the majority of runs” — in the body, “for 21 of 36 runs, higher reasoning effort does not improve accuracy.” Thinking harder is not a free upgrade, which is the same shape as the chain-of-thought result one layer up. An arXiv preprint.
The best public evidence that a system prompt is production code. Two sentences added to Claude Code’s system prompt — “Length limits: keep text between tool calls to ≤25 words. Keep final responses to ≤100 words unless the task requires more detail.” — shipped after “multiple weeks of internal testing and no regressions in the set of evaluations we ran”. Ablations against a broader eval set later “showed a 3% drop for both Opus 4.6 and 4.7”, and the prompt was reverted. The remediation is the lesson: per-model evals on every system-prompt change, line-level ablation, review and audit tooling, soak periods and gradual rollouts.
The shortest system prompt measured here, and the most instructive. At commit 3ea751c, config/default.yaml sets system_template to a single sentence: “You are a helpful assistant that can interact with a computer to solve tasks.” Fourteen words. Every real instruction — the uploaded repository, the PR description, the demand for minimal changes to non-test files — lives in the per-task instance_template instead.
The clearest case that “the system prompt” is often a fiction. At commit 5dc9490 the prompt surface is nine named constants across two modules: main_system is 181 words, system_reminder adds 354, and six more carry file context, a laziness reminder and an over-eagerness reminder — 817 words in total, assembled per request. It is also the only one of the five that opens with a persona line: “Act as an expert software developer.”
The most procedural of the five, at commit be59305. Notable for spending real space on parallelism — “identify every independent read, search, command, or edit needed for the next step and emit all of those tool calls now” — and for carrying the sharpest stop condition measured: “Response without tool calls will considered as completed with final answer.” The typo is in the original.
The prompt as a program rather than a document. At commit f917626, crates/goose/src/prompts/system.md is 161 words of which a large share is Jinja control flow; each enabled extension injects its own instructions at run time. It even tells the model about its own assembly: the conversation history “may refer to interactions with extensions that are not currently active”.
The longest measured, at commit 30bb116: src/smolagents/prompts/code_agent.yaml carries a 1,526-word system_prompt, 109 times SWE-agent's. Most of the difference is worked examples — full task-to-solution traces fixing the output shape. A deliberate trade for a library that targets many models, including weaker ones, and pays for those examples on every turn.
The source of the “right altitude” idea, verbatim: “The right altitude is the Goldilocks zone between two common failure modes. At one extreme, we see engineers hardcoding complex, brittle logic in their prompts to elicit exact agentic behavior… At the other extreme, engineers sometimes provide vague, high-level guidance that fails to give the LLM concrete signals.” Also names a specific chat habit as an agent failure mode: teams “stuff a laundry list of edge cases into a prompt… We do not recommend this.”
Read 2 September 2026; the page is undated and now covers Opus 5 and Sonnet 5 rather than Claude 4, despite the URL. Two reversals of widely copied advice. On emphasis: “Where you might have said ‘CRITICAL: You MUST use this tool when...’, you can use more normal prompting like ‘Use this tool when...’.” On self-checking: verification instructions “carried over from prompts tuned for earlier models can cause over-verification, adding tokens and latency. When migrating to Claude Opus 5, remove these instructions rather than rewriting them.”
Undated; read 2 September 2026. The clearest vendor statement that a chat technique does not transfer: “Avoid chain-of-thought prompts: Since these models perform reasoning internally, prompting them to ‘think step by step’ or ‘explain your reasoning’ is unnecessary.” And more strongly: such techniques “may not enhance performance (and can sometimes hinder it)”. Read alongside the GPT-5 guide, which restores the advice at low reasoning effort — the guidance is conditioned on effort, not on the model.
Why a vague prompt costs an agent more than it costs a chat: careful instruction-following “means that poorly-constructed prompts containing contradictory or vague instructions can be more damaging to GPT-5 than to other models, as it expends reasoning tokens searching for a way to reconcile the contradictions rather than picking one instruction at random.” It also restores chain-of-thought prompting at minimal reasoning effort, and reports that Markdown instruction adherence “can degrade over the course of a long conversation”, fixed by repeating the instruction every three to five messages.