The harness mid-session

The system prompt is written once, at the start. Everything the harness says after that arrives as messages in the conversation.

Checked against the Claude Code docs on 2026-10-02, with Claude Code 2.1.287, Codex CLI 0.160.0 and pi at commit 69f0be6.

The pages on Claude Code, Codex and pi mostly describe what the model gets at the start of a session. But a session changes as it runs: files are edited, modes switch, hooks fire, background jobs finish, the user goes quiet. The harness has to tell the model about each change, and all three do it by adding a message, not by rewriting what came before.

Why not just edit the prompt?

Because of the cache. A model provider caches the start of a request, so each turn pays full price only for what's new. Changing anything early in the conversation, including the system prompt, throws away the cache from that point on. Claude Code's prompt caching page spells out the consequences. When a file Claude already read is edited, "Claude Code appends a <system-reminder> noting the file changed" instead of updating the earlier read. A CLAUDE.md edited mid-session doesn't apply at all until /clear, /compact or a restart. Output styles and skills arrive as messages at the point they're used.

So the system prompt is closer to a snapshot of the session's start than a description of its current state. What's true now is spread through the conversation, and the model has to put it together.

Claude Code: over a hundred kinds of reminder

Claude Code wraps these messages in <system-reminder> tags. Its docs mention them only in passing. Hook output sent as additionalContext "is injected as a system reminder" (hooks guide), and a subagent gets a reminder listing the other agents it can message (subagents). The full set is visible only in the strings pulled from the program by Piebald-AI/claude-code-system-prompts. At v2.1.280 it lists 113 reminder types with about 32,000 tokens of text between them. Any one session sees only the few that apply to it. Grouped roughly by what they're about:

GroupTypesTokens
Plan mode and other modes195,572
Files and the IDE171,966
Remote machines and directory sync135,263
Artifacts, slides and designs1211,126
Warnings that text isn't from the user112,248
Agents, teams and background tasks101,944
Memory91,853
Tools and MCP81,092
Hooks7289
Budget and usage281
Other5788

Grouped by keywords in each reminder's name, so the boundaries are approximate. Token counts are Piebald's.

Two patterns stand out. Newer features carry the longest reminders. The artifact and design reminders are about a third of the text, and a few run past 1,500 tokens each, because the model learns how to use the feature when it's switched on rather than from the system prompt. And about one type in ten exists to tell the model that some text is not from the user: a message relayed from another session, a channel message, a scheduled task firing with "no live user approval", a comment on a published page. The harness has to keep marking where authority comes from, because everything reaches the model as text.

In one session

This is what arrived in the Claude Code session that wrote this page, as the model saw it (observed, 2026-09-24):

One thing that looks similar isn't a reminder. When auto mode's classifier blocked an edit to the settings file, the explanation came back as the tool call's result, with detailed instructions against getting the same result by another route.

A trusted channel can be imitated

Because the model gives reminders the weight of the harness, text that looks like one is a way to inject instructions. Claude Code checks each subagent's final report for this. If the report imitates a <system-reminder> tag, it inserts a backslash so the imitation "reads as ordinary text" and adds a warning line (subagents). The docs say plainly that this check "doesn't judge whether content is malicious" and is no substitute for limiting what a subagent can reach.

Codex: a handful of developer messages

Codex uses the developer message role for the same purpose. In the 62 sessions still on disk, after the first turn, the harness added only about eight kinds of message (observed, counted from the logs):

Codex also writes a turn_context record every turn, with the working directory, date, model and policies (see Codex, taken apart). Codex has much less to say mid-session than Claude Code, because it has fewer features that change while a session runs.

Pi: updating the system prompt itself

Pi goes the other way. It keeps the system prompt in named sections, and when one changes it sends only that section again, as a later system message: "Updated system prompt section …" or "Removed system prompt section …" (renderSystemMessageUpdate, from reading the code). That works only for models whose API accepts a system message partway through a conversation. For the rest, pi folds the update into the opening prompt, which costs the cache. Beyond that, new information reaches the model as ordinary user messages: steering messages typed while the agent works, and follow-ups queued for when it's done (how pi works).

What this adds to the survey

Keeping this current

This repo's check.py tracks every doc page and source file linked here. The Codex counts come from my session logs, and the Claude Code session list is from one session, so neither updates on its own.