Claude Code v2.1.334 Update: Search, Auto-compact, and a Batch of Bug Fixes

Claude Code v2.1.334 focuses on experience refinements, adding model search, finer-grained pricing, and numerous stability fixes.
Claude Code v2.1.334 is an iteration focused on polishing the experience and paying down debt rather than a major feature release. New features include a search box in `/model` when there are more than 25 models, an Auto-compact window row in `/config`, full-screen panes with `placement: "full"`, and Windows Arm desktop support. On pricing, cache write durations (5m/1h) and a long-prompt field are added to modelPricing and gateway overrides with backward compatibility; the gateway adds `--check config` for validation without starting the service. Fixes cover dozens of edge cases and cross-platform issues, including persistent session failures after mTLS certificate switching, worktree branches and unpushed commits, needless auto-compaction and false "Prompt is too long" errors, Glob/Grep matching, LSP, Vim keybindings, Code Mode context bloat and subagent stalls, and plugin loading and listing. The article notes that self-hosted runners now default to a 60-second timeout per call and adds a `--health-host` parameter.
An iteration focused mainly on polishing the experience
Claude Code has released v2.1.334. Judging from the changelog, this is not an update that introduces major features, but rather a dense round of experience refinements: it adds small but practical features such as a /model search box, an Auto-compact configuration entry, and health-check parameters for self-hosted runners, while fixing dozens of cross-platform and cross-mode bugs. For developers who use Claude Code heavily every day, the value of this kind of update is often more direct than that of new features—it addresses the friction points you're likely to hit every day.
New features: smoother model selection and configuration
/model list now supports search
When the model list exceeds 25 entries, the /model command now displays a search box, supporting matching by model name and model ID, with quick selection via arrow keys and number keys. For teams that integrate multiple models or use gateway routing, this can significantly reduce the time spent digging through long lists.
Auto-compact settings made visible
The /config screen now includes an Auto-compact window row, letting users directly view and modify the window size set via /autocompact without relying on memory of the command. This echoes the "needless auto-compaction" issue fixed in this release—configuration is more transparent, and behavior is more controllable.
Full-screen panes and desktop expansion
The new placement: "full" and client-side autoFocus allow a mod's pane to fill the terminal in full-screen mode until Esc is pressed to exit, and the client can receive keystrokes from the very beginning. On Windows, /desktop and claude --desktop support has been added on Arm computers, further expanding coverage.
Pricing and gateway: a finer-grained cost model
This update adds cacheWrite5m and cacheWrite1h to modelPricing, as well as longPrompt for Haiku 5.5; the gateway's pricing.overrides now also supports cache_write_5m, cache_write_1h, and long_prompt, while the old keys remain available. This means teams can distinguish prices for different cache write durations when doing cost accounting, and price long-prompt scenarios separately.
On the gateway side, claude gateway --config <file> --check config has been added, allowing the configuration file to be validated without starting the service, and reporting managed policy issues before connecting to Postgres at startup—exposing configuration errors at an earlier stage.
Cache write duration (cacheWrite5m / cacheWrite1h) refers to the billing dimension that distinguishes cache lifetime when writing prompt caches to a model provider. Most LLM APIs (such as Anthropic's prompt caching) allow a prompt prefix to be marked as cacheable; subsequent requests that hit the cache are billed at a lower "cache read" price, while the first write to the cache, or a rewrite after the cache expires, is billed at the "cache write" price, which is usually higher than normal input tokens. Write costs differ by lifetime (e.g., 5 minutes, 1 hour)—longer-lived caches tend to have higher unit prices. Previously, if costs could only be accounted for at a single cacheWrite price, teams could not distinguish the actual overhead of short-lived versus long-lived caches. With these two new fields, cost reports can isolate "the cache-write premium paid for long sessions," making it easier to judge whether a given workload is worth enabling long-lived caching for.
longPrompt (long-prompt pricing) is a mechanism for pricing requests that exceed a certain token threshold separately. Some models use tiered pricing for very long inputs, and Haiku 5.5 is one such case. Exposing longPrompt in modelPricing and gateway overrides means the gateway can select the corresponding price tier based on actual prompt length when forwarding requests, rather than lumping all requests into the base unit price, making internal billing closer to the real bill.
Key fixes: stability and compatibility
Session and certificate issues
- Fixed an issue where the session continued to fail after an mTLS client certificate was switched to an expired or unavailable certificate file due to a transient HTTP 400 error.
- Fixed worktree starting from the wrong branch or local HEAD after Claude switched to another repository, as well as
--worktreeanomalies when the default branch of a bare repository is notmain. - Fixed the loss of unpushed commits held only by that branch when resuming an unchanged worktree.
mTLS (mutual TLS) is a transport-layer security mode in which the client and server verify each other's certificates. Unlike common one-way TLS, where only the client verifies the server, mTLS requires the client to present a certificate as well, so the server can confirm the caller's identity; it is therefore widely used in enterprise intranets, service meshes, and API gateways. Client certificates usually have an expiration date and may have multiple candidate files configured (e.g., a primary and a backup). When a request triggers certificate re-selection logic due to a transient error (such as HTTP 400), a poor implementation may incorrectly switch the "currently usable certificate" to an expired or path-unavailable file, and this erroneous state is inherited by subsequent sessions, causing all later requests to fail. This fix addresses exactly that kind of state contamination: a transient error should not change the certificate selection already in effect unless the new certificate is verified as usable. Understanding this helps explain why the bug manifests as "the session keeps failing after one sporadic error" rather than a single failed request.
Compaction and context
- Fixed an issue where a response reaching the output token limit before writing any text triggered needless auto-compaction or a false "Prompt is too long" error.
- Fixed
/compactand auto-compaction sometimes leaving the model's draft notes ahead of the conversation summary. - Fixed
/contextdrawing the compaction buffer as used space when auto-compaction is disabled.
Auto-compact is the mechanism by which Claude Code automatically summarizes earlier conversation content to free up space when the conversation context approaches the model's window limit. It is typically triggered by comparing the number of used tokens against the configured compaction window (threshold). If the measurement is wrong—for example, counting a response that hit the output limit before writing any text as "context too long," or drawing the buffer reserved for compaction as used space—two opposite problems arise: needless compaction, i.e., discarding details when the limit is not actually close, and false "Prompt is too long" errors. This release fixes both the trigger condition and the /context display measurement, and adds an Auto-compact window row in /config, with the goal of turning "when to compact and by how much" from implicit behavior into visible, adjustable parameters. For developers working in long sessions, compaction timing directly affects how many early decisions the model can still remember, so the real-world benefit of this group of changes is often greater than it appears on the surface.
Tool and IDE integration
- Fixed Glob and Grep failing to match patterns starting with
./, and Grep failing on brace lists such as*.{ts,tsx},*.js. - Fixed the LSP tool falsely reporting no server during plugin reloads, and uppercase extensions (such as
.R) being treated as plain text. - Fixed
/ideand auto-connect failing to find the editor on Linux hosts withoutpsinstalled.
Platform and terminal details
- On macOS, fixed
gitcertificate verification failures in sandboxed commands when an enterprise CA is trusted via the keychain orNODE_EXTRA_CA_CERTS. - On Windows, fixed official plugin marketplace updates failing because files were briefly locked by another program.
- In Vim mode, fixed several keybinding behaviors inconsistent with Vim, such as
bskipping blank lines,dbjoining lines, anddFtaking one extra character.
Notable Code Mode and plugin fixes
Code Mode received several fixes in this update: script tool calls no longer count toward context size (which previously caused premature compaction), images or PDFs are no longer re-sent after an API rejection, the terminal no longer freezes when a check script rms a large number of files, and the "Agent stalled" issue for subagents running longer than 10 minutes in 2.1.333 has been resolved.
On the plugin side, fixed plugins enabled via --settings or user settings not loading on the second startup on a new machine, and reading the list during installation failing and causing other plugin records to be lost. /plugin list also no longer marks healthy plugins as "couldn't load" because of a same-named plugin in another marketplace failing.
What these changes mean
Judging by the density of updates, v2.1.334 is more like a round of "paying down debt": a large number of entries focus on edge cases, platform differences, and interaction details. Individually, such fixes seem minor, but cumulatively they noticeably change day-to-day smoothness. For team users, finer-grained pricing, gateway configuration validation, and the 60-second default call timeout for self-hosted runners are the operational changes worth paying more attention to.
If you use a self-hosted runner, note the newly added --health-host 127.0.0.1 parameter, as well as the behavior where each call ends by default after 60 seconds—this will affect your orchestration strategy for long tasks.
One-line Summary
Claude Code v2.1.334 focuses on experience refinements, adding model search, finer-grained pricing, and numerous stability fixes.
Paragraph Summary
Claude Code v2.1.334 is an iteration focused mainly on polishing the experience and paying down debt, rather than a major feature release. New features include: a search box in /model when there are more than 25 models, an Auto-compact window row in /config, full-screen panes via placement: "full", and Windows Arm desktop support. On the pricing side, cache write durations (5m/1h) and a long-prompt field have been added to modelPricing and gateway overrides, with old keys kept compatible; the gateway adds --check config to validate configuration without starting the service. Fixes cover dozens of edge-case and cross-platform issues, including sessions continuing to fail after mTLS certificate switching, worktree branches and unpushed commits, needless auto-compaction and false "Prompt is too long" errors, Glob/Grep pattern matching, LSP, Vim keybindings, Code Mode context bloat and subagent stalls, and plugin loading and listing. The article ends by noting that self-hosted runners now time out after 60 seconds per call by default, and that a --health-host parameter has been added.
Related articles

ChatGPT Plus/Pro Subscription Guide: Sorted in 2 Minutes in China
A complete ChatGPT subscription guide based on a Bilibili tutorial: Google account registration, Go/Plus/Pro plan comparison, fast recharge in China, and third-party recharge risks.

GPT Beginner's Complete Guide: Registration, Desktop Installation, and Subscription Options in China
A complete GPT beginner's guide: domestic email registration, desktop download and installation, and three domestic subscription options—Android Google Play, Apple gift cards, and Alipay/WeChat—plus detailed explanations of the 5-hour limit and weekly limit, and the difference between PlusDump and ProDump. Even complete beginners can follow along.

GLM 5.4 Lands on AI Gateway: A Coding Flagship Powered by Loop Transformer
Z.ai's flagship GLM 5.4 is now on AI Gateway — the first GLM built on Loop Transformer, with image input, 1M token context, and generalized coding via zai/glm-5.4.