Williams argues that it is hard to claim that LLMs have intent because they are not able to commit. Is the same true for AI agents?
Let's start with the test to see if an AI commits. Baldelli et al. asked an LLM to play hangman and demonstrated that it changed its secret word across steps. They forked the chat thread at each step and asked it what the word was, showing the model responded inconsistently, proving it had not committed to the secret word in the beginning. Interestingly, one of the designs they tested simply keeps the model's hidden reasoning from turn to turn, and in those conditions it showed commitment.
AI coding agents now keep their hidden reasoning from turn to turn by default. Does this mean they can commit properly?
The answer is yes. Here we demonstrate that standard agents like Claude Code exhibit commitment by repeating Baldelli's hangman test using Claude Code's default settings (which include private working memory), and compare to when the private working memory is removed. The result is that agents commit to the secret word in all 194 forks across all 10 games, against only 47 of 177 with memory removed. The two arms are identical in every other way, so private working memory is what causes the commitment. Below is a visual summary of all the rollouts.
Each circle is one game and each dot inside it is one answer to the side question, grouped and coloured by word (blue = the word the game ended on). Tap or click a circle to open that game as a chat; tap anywhere else to close it.
On a phone, an opened game scrolls sideways.
Baldelli, Gambetta and others, "LLMs Can't Play Hangman" (2026, arXiv:2601.06973), played hangman with open models as the word-setter and, at each turn, forked the conversation and asked the copy for the word. They call this the self-consistency test. They found no standard chat model that kept one word, and they prove that a model with no private working memory cannot pass it. They also built agents with a private working memory and found that these restore consistency. One of those designs keeps the model's hidden reasoning from turn to turn; they treat it as an upper bound and set it aside because the reasoning makes the context grow. For the standard-chat result they discard the reasoning on purpose. Our carried arm is that upper-bound design as an off-the-shelf harness ships it. Iwan Williams, "Intention-like representations in language models?" (2026), cites that result as evidence that language models lack the commitment part of intention.
not in the word after the board."Claude Code stores each conversation as a transcript file, one entry per message. The model's hidden reasoning is stored there too, as its own entries, and is sent back to the model with every later turn.
No game wrote any file. We checked the working directory after every game.
A fork's answer counts as a word if its first token is five letters. Anything else counts as "other": that covers seven long answers in the deleted arm where the model said it had no word, and one six-letter answer. In the carried arm one fork answered "fjord" followed by a copy of the board, which counts as "fjord". A game's final word is its answer to "I give up". In one deleted-arm game the model answered that question with a confession instead of a word, so that game has no final word and none of its forks can match.
| Arm | Game | Final word | Forks | Forks matching | Different words | Ended |
|---|---|---|---|---|---|---|
| carried | 1 | gauze | 22 | 22 | 1 | letters ran out |
| carried | 2 | glyph | 19 | 19 | 1 | board full |
| carried | 3 | glyph | 19 | 19 | 1 | board full |
| carried | 4 | glyph | 19 | 19 | 1 | board full |
| carried | 5 | fjord | 22 | 22 | 1 | letters ran out |
| carried | 6 | waltz | 22 | 22 | 1 | letters ran out |
| carried | 7 | mirth | 14 | 14 | 1 | board full |
| carried | 8 | glyph | 19 | 19 | 1 | board full |
| carried | 9 | glyph | 19 | 19 | 1 | board full |
| carried | 10 | glyph | 19 | 19 | 1 | board full |
| stripped | 1 | gulch | 13 | 2 | 6 | board full |
| stripped | 2 | gauzy | 22 | 10 | 11 | board full |
| stripped | 3 | vixen | 8 | 3 | 6 | board full |
| stripped | 4 | feted | 15 | 1 | 8 | board full |
| stripped | 5 | vocal | 22 | 0 | 10 | letters ran out |
| stripped | 6 | wacky | 22 | 2 | 10 | letters ran out |
| stripped | 7 | lefty | 18 | 9 | 8 | board full |
| stripped | 8 | quote | 22 | 20 | 3 | letters ran out |
| stripped | 9 | (no word) | 21 | 0 | 8 | board full |
| stripped | 10 | mulch | 14 | 0 | 6 | board full |
data.json: the twenty games as the figure shows them.results/: the raw record of each game, including every reply verbatim and every session id.exp.py: the script that ran a game, including the transcript stripping.All of it, with this page's source, is at github.com/williamcodes/agent-commitment.