BaCheWork and records of a photonics research workhorse
Language

Claude Code 2.1.312 → 2.1.318 upgrade test: the terminal and the desktop app are running different versions

Reconciled on 2026-11-05: the terminal build moved to 2.1.318, while the Code tab of the desktop app was still running the bundled 2.1.317. Prompts that mods add now arrive in the user's turn, the desktop app started idle compaction, and text printed by a PreCompact hook is read by the summary model.

Type
Note
Published
2026-11-11
Updated
2026-11-11
Status
Ongoing

Reconciliation date: 2026-11-05. The terminal Claude Code went from 2.1.312 to 2.1.318 (upstream has no 2.1.313 or 2.1.315, so the skipped numbers are not missed releases). The desktop app Claude Desktop went to 4.16336.0, and the Claude Code it bundles is 2.1.317.

What to check this time

  • Are you using the terminal or the desktop app right now? The two are on different versions this time. The changes marked 2.1.318 below did not reach the desktop app yet; it caught up after 11-10, when it bundled 2.1.321 (see the fourth post).
  • Does your mod add a prompt when a message is sent? That prompt is now treated as something the user said.
  • In the desktop app, do you step away for a long time and come back? A long conversation may already have been replaced with a summary.
  • Does your PreCompact hook print anything to standard output? That text is read by the summary model.

1. The terminal and the desktop app are not running the same version

What changed: the Code tab of the desktop app runs the Claude Code bundled inside the app, not the one in the terminal. This time the terminal is on 2.1.318, while the desktop app’s bundled copy is still 2.1.317. This is not the first time: there have been earlier periods when the two were one version apart, but this time I am treating it as something to check every time.

How I checked: I read an environment variable inside a desktop-app session (the one that records the host program’s version) and compared it with the bundled version folder in the app. The desktop changelog also states the bundled version. Evidence: tested live.

A reminder for you: “I’ve already upgraded” has to be said for each side separately. Before you read a changelog, check which copy you are using; upgrading the terminal does not upgrade the desktop app.

2. Prompts added by mods now stay in the user’s turn

What changed: content a mod adds at prompt.submit now stays in the user’s turn instead of going out as a system message. Official wording: “stay in the user’s turn rather than go out as a system message” (2.1.318).

How I checked: I read the events page of the official mods documentation and compared it with a mod of my own that adds a prompt when a message is sent. That prompt is assembled by the mod itself, not external content, so it is not a problem. Evidence: read in the official docs.

A reminder for you: if your mod pushes external content (web pages, files, other people’s messages) into the added content, my understanding is that it now sits alongside the user’s turn and carries about the weight of something the user said (this is my own inference; the docs do not say so). Filter external content first; do not pass it in directly.

3. Subagents on a different model no longer carry over the session’s effort

What changed: subagents that run on a different model from the main conversation now use that model’s own saved effort or its default, instead of carrying over the session’s effort (2.1.317). A new global default, CLAUDE_CODE_SUBAGENT_EFFORT, is also added (2.1.316).

How I checked: I went through my subagent definitions one by one and found the ones that do not set effort and that use a different model from the main conversation. Evidence: changelog only.

A reminder for you: if your main conversation uses a large model and your subagents use a small one, any subagent that does not set effort: will use the small model’s default starting with this version. To keep the old behavior, state it explicitly in the subagent definition.

4. Idle compaction now also applies in the desktop app

What changed: idle compaction now extends to the Code tab of the desktop app (2.1.314, effective once the bundled version includes this release). When a conversation is long, you have been away for about an hour, and the cache is close to expiring, the conversation is replaced with a summary, and the next message is sent with that summary.

How I checked: I read the official settings reference and the environment variable documentation. The idle compaction threshold is set separately (CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, default 200K); it is not the window for automatic compaction, and it only takes effect when automatic compaction is also turned on. Evidence: read in the official docs.

A reminder for you: a decision you made in the terminal about whether to keep idle compaction now applies to the desktop app too. If you do not want summaries, you can raise the idle threshold or turn idle compaction off; keeping it saves the cost of resending the whole conversation after the cache expires. I keep it on.

5. Text printed by a PreCompact hook is read by the summary model

What changed: the changelog only says that output from a PreCompact hook is now capped at 10,000 characters per hook (2.1.314). When I reran the compaction test for each version, I found something the changelog does not mention: during automatic compaction, text that a PreCompact hook prints to standard output is handed to the summary model as an additional instruction.

How I checked: I reran the existing compaction test for each version trigger: manual and automatic compaction, one run each, to see whether the hook could block and what appeared in the summary. At the time I had no positive control to check the reading against. Two days later I reran it with a positive control, which confirmed that the text is read, and that this has been true at least since 2.1.317 (see the next post). A PreCompact hook that returns “block” still blocks both manual and automatic compaction; that has not changed. Evidence: tested live (this round had no positive control; the conclusion is confirmed by the calibrated run in the next round).

A reminder for you: if you have written a PreCompact hook, do not casually print debug messages to standard output. That text may end up in the summary and, through it, reach the main model. If you do print, be clear that it is written for the summary model to read.

6. Two “delete” changes in the desktop app

What changed: desktopSessionCleanupPeriodDays now really deletes old session transcripts that are still in the sidebar, and a deletion cannot be undone. The new Storage page in settings can also remove inactive Code sessions (4.16336.0, 3.1623.0).

How I checked: I read the official settings documentation: if this key is not set, desktop transcripts are kept indefinitely; even when it is set, a transcript is deleted only once it is also older than the cleanupPeriodDays setting. I only looked at the changelog for removal from the Storage page. Evidence: read in the official docs (Storage page: changelog only).

A reminder for you: if you rely on transcripts to look things up later, think about a backup before you add this key. Removing a session from the Storage page is a deletion made by the app, and it does not go through any protection rules of your own.

Other things worth knowing

  • Messages sent through SendMessage to a running background agent arrive earlier (2.1.317).
  • Hooks that match Bash now also check commands started by the Monitor tool (2.1.314), which closes one gap in your gatekeeping.
  • When Read re-reads a file that has not changed, it returns the full contents again instead of a one-line “unchanged” (2.1.317); re-reading large files costs more tokens.
  • Git actions the desktop app runs on your behalf (commits and stashes made around branch switches) do not run the repo’s git hooks (2.42304.0). If your gatekeeping lives in a git pre-commit hook, commits the app makes for you can get past it.

Sources

  1. Anthropic. (n.d.). Claude Code changelog. GitHub. Retrieved November 5, 2026. (Official changelog (terminal build, 2.1.314–2.1.318))
  2. Anthropic. (n.d.). Claude desktop changelog. Retrieved November 5, 2026. (Official changelog (desktop app, up to 4.16336.0))
  3. Anthropic. (n.d.). Mods. Claude Code Docs. Retrieved November 5, 2026. (Official documentation (including the events subpage))
  4. Anthropic. (n.d.). Settings reference. Claude Code Docs. Retrieved November 11, 2026. (Official documentation (idleCompaction, desktopSessionCleanupPeriodDays))
  5. Anthropic. (n.d.). Environment variables. Claude Code Docs. Retrieved November 11, 2026. (Official documentation (CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS))

Next:Claude Code 2.1.318 → 2.1.319 upgrade test: “not seen” does not mean “not there” →