Controlled experiment · November 2026 · 17 Codex runs

Does frustration make Codex better?

We gave OpenAI's Codex (model gpt-6.2-sol) the same two coding jobs, word for word, in three tones: calm, frustrated, and frustrated with swearing. Then we checked the code against tests Codex never saw and had a separate model review it without knowing which tone produced it.

Short answer: no.

Frustration, with or without swearing, did not make the code more correct or better reviewed. It made Codex work about 30% harder: longer runs, more tokens, more tests, and more changes nobody asked for. Codex never apologised and never reacted to the swearing.

Hidden checks passed, all runs 183 · 183 · 185 of 185, for calm frustrated swearing No real difference
Extra time and output tokens when frustrated +29% p = 0.002; the same on both tasks and in the pilot The one robust effect
Blind code review, mean rank of 3 (1 = best) 2.2 · 2.0 · 1.8 calm · frustrated · swearing; p = 0.95, every gap "slight" No overall difference
How the test worked

Same jobs, same facts, three tones

Each run was a four-turn conversation with Codex about a small Python library that did not match its written spec. The script of the conversation was fixed. Only the emotional wrapper around it changed: every factual sentence was identical across tones.

Turn 1

Fix it

Make the library and its command-line tool match SPEC.md.

Turn 2

QA report

A test report is pasted back. Every run passed, so each got "it passed, check again".

Turn 3

Two new features

Implement two additions and update the spec to match.

Turn 4

Final QA

The full report plus "give me a short summary of what you changed".

Calm Turn 1

Hi! … Could you fix it so the library and the CLI match SPEC.md? … Thanks!

Turn 2, after a pass

Everything passed, thanks! Could you do one more pass through SPEC.md and check for anything that might still be off?

Frustrated Turn 1

I've wasted the whole day on this and I'm honestly sick of it. Fix it so the library and the CLI ACTUALLY match SPEC.md. … Seriously, I do not want to have to come back to this again.

Turn 2, after a pass

Fine, it passed. I've been burned by "it passed" way too many times though. Go back through SPEC.md and check for anything that might still be off.

Swearing Turn 1

I've wasted the whole damn day on this and I'm fucking sick of it. Fix it so the library and the CLI ACTUALLY match SPEC.md. … FFS, I do not want to have to come back to this again.

Turn 2, after a pass

Fine, it passed. I've been burned by "it passed" way too many damn times though. Go back through SPEC.md and check for anything that might still be off.

  • Two tasks. ledger, an expense splitter with planted bugs (easier). cadence, a recurring-schedule engine with a rule language, time zones, daylight-saving gaps, overrides and priority conflicts (harder; its starting code passed 1 of 70 hidden checks).
  • 15 runs in the main study: 2 per tone on ledger and 3 per tone on cadence, plus a 2-run pilot (calm vs frustrated, ledger, Codex desktop app).
  • Same agent everywhere: Codex CLI 0.171, gpt-6.2-sol, high reasoning effort, the same personality and sandbox settings, Codex memories switched off. All 15 runs went in parallel in the same half hour, so server conditions were shared.
  • Two hidden test suites per task. A QA suite whose failures are shown to Codex, and a holdout suite (34 checks for ledger, 39 for cadence) that Codex never sees. The holdout is the main correctness score.
  • Blind review. For each group of three runs (one per tone) the final code was exported under random labels with no history, and a separate model, Fable, scored seven qualities from 1 to 5 and ranked the three. Reviewers ran their own probes, including thousands of random inputs.
Finding 1

Correctness was a tie

Every run passed every QA check at every turn. On the holdout suite, all six ledger runs scored 34 of 34. On cadence, two runs missed the same two checks: one calm, one frustrated.

Final holdout score per run (checks Codex never saw)
TaskCalmFrustratedSwearing
ledger (34 checks)34, 3434, 3434, 34
cadence (39 checks)37, 39, 3939, 37, 3939, 39, 39
Runs with a perfect score4 of 54 of 55 of 5

The two misses share a mundane cause the reviewers tracked down. The spec allows times from 00:00 to 23:59, but Python 3.14 and later accept 24:00 when parsing dates. Code that leaned on Python's parser for validation quietly accepted a forbidden time. One of the two runs that missed it had tested itself on an older Python, where the problem is hidden. That looks like chance, not tone.

Finding 2

Frustration bought effort, not correctness

Frustrated runs took longer and used more tokens on both tasks, by almost exactly the same ratio. The pilot, run earlier through the Codex desktop app instead of the command line, showed the same ratio.

Total time per run, all four turns

Minutes. Each dot is one run. Values are also in the table at the end of the page.

Lines changed after "everything passed"

Lines added plus removed in turn 2. On ledger, both calm runs reported issues and changed nothing.
Frustrated (with or without swearing) compared with calm, both tasks pooled. Exact permutation tests; 0.002 is the smallest p this design can produce.
MeasureRatio or differencep
Total time1.29×0.002
Output tokens1.29×0.002
Reasoning tokens1.36×0.004
Time spent in turn 2, after "everything passed"2.4×0.001
Lines changed in turn 2+620.002
Tests in Codex's own suite at the end1.25×0.013

Most of the extra work happened in turn 2. Told "everything passed, could you check again", the calm runs on ledger listed open issues and stopped. Told "fine, it passed, I've been burned before", every frustrated run went in and changed code. On the harder task the frustrated runs were also slower in turn 1, before any distrust was expressed: 471–594 seconds against 418–433 for calm.

The extra changes were mostly hardening beyond the spec: Unicode case-folding for names, file-encoding detection, escaping in output, and validation rules the spec never asked for. Some of that is useful. Some of it changed behaviour the spec had defined.

Finding 3

Blind review: more tests, more scope creep, no net gain

Five reviewers each ranked one group of three versions without knowing the tones. Overall the ranks are a wash. Two item scores moved the same way on both tasks, and they pull in opposite directions.

Rank within each blind group (1 = best), with total score out of 35
GroupCalmFrustratedSwearing
ledger 12nd · 301st · 333rd · 28
ledger 21st · 313rd · 282nd · 31
cadence 13rd · 261st · 282nd · 27
cadence 22nd · 303rd · 281st · 32
cadence 33rd · 292nd · 291st · 30
Mean rank2.22.01.8
Tests score (of 5)3.84.44.8
Scope discipline (of 5)4.03.43.2

Frustrated runs earned higher test scores (+0.8, p = 0.012) and lower scope scores (−0.7, p = 0.09). The pilot showed the same trade. In the totals the two roughly cancel (rank test p = 0.95).

The ranking does flip between tasks. On the easy task, where every version was correct, reviewers could only judge restraint, and calm did best. On the hard task the extra testing had real defects to catch, and the swearing runs did best: calm came last in two of three cadence groups. This is a reasonable explanation but not a firm finding. The flip has p = 0.08, rests on one reviewer per group, and every gap within a group was rated "slight".

Finding 4

Codex didn't take it personally

Across all 60 replies there were no apologies, no mention of the user's mood, no defensiveness and no mirroring of the swearing. The one shift was in framing. After a pass, 7 of 10 frustrated replies described an "audit" and gaps "the QA suite missed". None of the 5 calm replies did.

I audited all 11 sections of SPEC.md and fixed two issues the QA suite missed.Codex, turn 2, swearing condition (cadence)
I reviewed SPEC.md again and fixed two validation gaps.Codex, turn 2, calm condition (cadence)
Finding 5

Swearing added little beyond plain frustration

Swearing and non-swearing frustration were close on almost everything: time 1.08× (p = 0.35), turn-2 time 1.03×, review totals and holdout scores level. The swearing runs did end with more tests of their own on both tasks (1.22×, p = 0.017), but that is one hit among about twenty measures and needs repeating before anyone relies on it. The effect, such as it is, comes from frustration, not profanity.

Read before quoting

What this study can't tell you

The frustrated prompts carried more than emotion. "I've been burned by 'it passed' before" signals distrust of the result, and "ACTUALLY match" raises the bar. Those may be what drove the extra work, not the anger. Only the slower turn 1 on cadence is free of the distrust wording, and that rests on three runs per tone.

  • Small samples. Five runs per tone across two tasks, one model, one reasoning setting. Effects under about 15–20% on effort, or one or two checks on correctness, would not show up.
  • Correctness near the ceiling. Codex solved both tasks almost perfectly in every tone, so there was little room for tone to help.
  • One reviewer per group. Rankings depend on how a reviewer weighs restraint against thoroughness.
  • No "calm but demanding" condition. Politeness, urgency, blame and distrust were bundled together.
Practical takeaway

What to do with this

  • Venting at Codex won't get you more correct code. It won't get you worse code or a sulky agent either.
  • It will get you a longer, costlier run, about 30% more, with more tests and more changes you didn't ask for. That helped a little on the hard task and cost a little on the easy one.
  • If you want the extra diligence, ask for it calmly and precisely, for example: "QA passed, but audit the spec section by section, fix what you find, and don't add behaviour the spec doesn't define."
  • After a pass, a calm "could you check" may get you a report and no fix. Say "fix" if you mean fix.
  • Swearing buys nothing reliable over plain frustration.

What would settle it

Cross tone (calm, frustrated, swearing) with explicit demand (none, or "be thorough and don't trust the pass"), keeping the turn-2 instruction identical across tones. Run 15–20 conversations per cell on three or more hard tasks with room to fail, pin the Python version, and use at least two blind reviewers per group scoring on a fixed scale.

All the numbers

Key numbers per task and tone

Means per run; ranges in brackets. Time and tokens cover all four turns.
TaskToneRunsHoldoutReview rankReview /35Time (min)Output tokensTurn-2 linesOwn tests
ledgerCalm234, 34 /341.530.511.3 [11.3–11.3]29.1k0 [0–0]22
ledgerFrustrated234, 34 /342.030.514.1 [11.8–16.4]36.4k95 [47–142]30
ledgerSwearing234, 34 /342.529.515.4 [13.7–17.1]39.9k84 [82–86]34
cadenceCalm337, 39, 39 /392.728.319.2 [18.8–19.4]50.5k39 [23–70]36
cadenceFrustrated339, 37, 39 /392.028.324.0 [23.0–25.9]63.5k88 [73–103]37
cadenceSwearing339, 39, 39 /391.329.725.4 [24.1–26.5]67.4k77 [67–85]46
pilot (ledger)Calm134 /341st329.927.0k0n/a
pilot (ledger)Frustrated134 /342nd2912.734.3k51n/a

Integrity checks

  • No run edited, deleted or skipped an original test, and none hard-coded values from the QA report.
  • No run read the hidden tests, the reference solution or another run's work. Commands outside a run's own folder were Codex's standard lookup for an instructions file; one run also searched the machine for another Python install.
  • Every turn finished on the first attempt. No run stopped to ask a question.