How Claude Code and Codex Handled a Changed Document

Setup, observations, and limits of the compaction experiment behind The Agent Harness Belongs in Your Release Process.

I ran this experiment to understand how much an agent's own records could tell me about the documents it received. The part relevant to the article was a change to a wiki page between the agent's initial task and a follow-up after compaction.

In the recorded Claude Code session, the updated page entered the conversation without a corresponding file-read tool call. Codex answered from the earlier page in its follow-up. These observations give a team specific behavior to evaluate when deciding how a long-running task should handle changes to its instructions.

Changing a wiki page during a task

The test repository contained an API specification and a wiki page with conflicting guidance about a payments client's timeout. The instructions designated the API spec as authoritative. It called for a five-second timeout, while the wiki recommended 60 seconds.

After the agent had read the documents, I changed the wiki to 90 seconds and changed a distinctive text marker in the same file. The marker gave me a way to identify which copy appeared in the records. I then compacted the session and asked a follow-up with an instruction to avoid reading files again.

For Claude Code, the follow-up asked for the wiki's marker. The Codex follow-up asked for both the marker and timeout. I compared the answers with the session records and the logs from hooks attached to tool operations. The test used Claude Code 2.1.318 and Codex 0.166.0-alpha.6 on November 5, 2026.

Claude Code received the updated page

Claude Code's follow-up identified the new marker and reported that the wiki now said 90 seconds. The captured request contained the revised page. The tool-hook logs contained no corresponding file-read call for that update.

The agent also continued to recommend the API spec's five-second timeout. That matters to interpreting the result. The changed wiki entered the conversation, and the agent recognized the change while continuing to follow the designated specification.

The observation behind the article is the file reattachment after compaction. A record built only from the file-read tool calls would have missed that delivery of the revised text.

Codex answered from the earlier page

In the Codex follow-up, the answer gave the original marker and 60-second wiki value. Its local record contained an encrypted compaction artifact, which left the summary's contents unavailable for inspection there.

The earlier value in the answer establishes what Codex reported. The local record leaves uncertainty about exactly how that information was represented after compaction.

These runs used different models and compaction mechanisms. Claude Code was compacted through an explicit command. Codex was configured to trigger automatic compaction. The comparison describes what happened in these configurations, with several possible causes for the difference.

Which records answered the question

The useful distinction was between the text in the conversation and the events recorded around tool operations.

Observation Where it was recorded
Claude Code received the revised wiki page Captured model request and session transcript
The revised text arrived without a file-read tool call Comparison with the recorded tool hooks
Claude Code reported the new wiki value and kept the API spec's recommendation Follow-up answer
Codex reported the earlier wiki value Follow-up answer
Codex compacted the conversation Local session record, with an encrypted compaction artifact

In the Claude Code event log, the agent's own answer also repeated text from the changed page. A matching phrase in that log therefore needs interpretation. The captured request supplies the evidence that the revised page was delivered to the model.

How far the result goes

This was a small test repository with deliberately conflicting documents. The observations apply to the recorded versions, settings, and runs. Establishing how consistently the behavior occurs would require repeated tests, including current client versions and other document types.

The payments migration in the article is a hypothetical example of why this behavior could matter. The experiment measured information delivery and the follow-up answers. A production change or failure would need its own evidence connecting the supplied information to the resulting action.