{"schemaVersion":"1.0","publication":{"slug":"pivot-claude-code","name":"Claude Code Review","description":"Workflows, releases, and field notes for Anthropic's coding agent.","audience":"Developers and teams adopting Claude Code.","geography":null},"edition":{"id":"ea389b98-9eef-4f5b-a9aa-9a2c065a3134","date":"2026-10-07","status":"locked","createdAt":"2026-10-06T16:12:36.521Z","storyCount":10,"newsletterSubject":"Helper agents cache context five minutes, Install plugins and catalog in one command, Hourly Google sign-in traced to renewal mismatch"},"updatedAt":"2026-10-07T10:31:19.248Z","stories":[{"id":"5c7294f3-72f2-4940-ab71-c3663c4e3221","title":"Claude Code's helper agents reportedly cache context for 5 minutes, not 1 hour, raising costs on long runs","dek":"Helper agents are the side workers Claude Code spins up apart from your main chat, and a user reports they hold onto context for only 5 minutes, after which the whole context is processed again from scratch. Claude Code can remember the earlier part of your conversation for a while so it doesn't have to reread it each time, which keeps costs down. Context is everything the AI has been given to work from, such as your messages, files and earlier replies.","bodyMd":"A Claude Code user reports that the helper agents the tool launches for side tasks (called subagents) keep their cached context for 5 minutes by default. The main session gets 1 hour on a subscription, according to the same post. The user says they noticed their weekly budget draining faster than expected during a long task, then traced it to the shorter cache.\n\nThe cost comes from what happens after an idle gap. If a subagent sits for more than 5 minutes and Claude returns to it, the cache has expired and the whole context is processed again from scratch. On Opus 5.5, Anthropic's model, the poster puts that at about 25 times the cost of a cached read. In a long run it repeats, and the user says it quietly eats into the usage limit.\n\nThe suggested fix is a single settings line: `\"subagentPromptCacheTtl\": \"1h\"`, which needs Claude Code 2.1.242 or newer. The poster cautions against flipping it everywhere. A 1-hour cache write costs more than a 5-minute one, so it pays off only when subagents sit idle between calls and get reused. Short subagents that finish quickly are fine on the default.\n\nThe poster lists API cache prices per million tokens. Opus 5.5: $4 input, $5 for a 5-minute write, $8 for a 1-hour write, $0.20 for a cached read. Fable 5.1, another Anthropic model: $10 input, $12.50 for a 5-minute write, $20 for a 1-hour write, $0.25 for a cached read.\n\nA separate workflow write-up, generated from a related post, describes a heavier approach. It standardizes repo commands behind make or shell scripts listed in AGENTS.md, adds a skill that records timing for each command, and uses a start-of-session hook to feed that timing table to Claude. The user also defines custom subagents with 1-hour cache lifetimes alongside default 5-minute ones, such as \"worker\" and \"analyst\" types. Claude then picks the subagent based on how long it expects the commands to run. That user reports saving about 5% of total usage over a month. The write-up itself calls the setup \"a bit involved,\" gives no code for the skill or hook, and notes results will vary with how often a repo runs long tasks.\n\nBoth accounts are individual reports, and Anthropic's own documentation is not among the sources.","status":"published","storyType":"news","category":"Pricing","clusterKey":"subagent-5-minute-cache-default","slug":"claude-code-s-helper-agents-reportedly-cache-context-for-5-minutes-not-1-5c7294","url":"https://claudecodereview.ai/a/claude-code-s-helper-agents-reportedly-cache-context-for-5-minutes-not-1-5c7294/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/5c7294f3-72f2-4940-ab71-c3663c4e3221","role":"lead","position":0,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-s-helper-agents-reportedly-cache-context-for-5-minutes-not-1-5c7294/bbab80ff0fcf0cc1-c2e9bb3255bf8337/web_hero.webp","imageAlt":"Twelve vertical blocks in a stack with a gap between the bottom two and the top ten, representing cache segments.","createdAt":"2026-10-07T09:49:36.170Z","updatedAt":"2026-10-07T10:00:28.614Z","sources":[{"role":"primary","title":"Claude Code Subagents Default to 5-Minute Cache, Quietly Inflating Costs","url":"https://reddit.com/r/ClaudeCode/comments/1wz1qd4/subagents_use_a_5min_cache_by_default","sourceName":"u/Master-Biscotti-1186","author":"u/Master-Biscotti-1186","publishedAt":"2026-10-06T12:49:09Z"},{"role":"supporting","title":"[Workflow] Optimize Claude Code Subagent Caching and Selection with Custom Skills, Hooks, and Repo APIs","url":"https://reddit.com/r/ClaudeWorkflows/comments/1wzoxpe/workflow_optimize_claude_code_subagent_caching","sourceName":"/u/ClaudeAI-mod-bot","author":"/u/ClaudeAI-mod-bot","publishedAt":"2026-10-07T06:01:51Z"}]},{"id":"30597135-c327-43e1-97d2-3ffdbb210bde","title":"Claude Code v2.1.292 lets you install a plugin and add its catalog in one command","dek":"A catalog here is a list of plugins you can browse and install from, and you can now add one and install from it in a single step. The release also adds an effort level for sub-agents and prompt caching for mods, which are extensions that hook into Claude Code and can now reuse text they already sent to the AI instead of sending it again. Sub-agents are helper AIs that Claude Code starts to handle part of a task, and you can now choose how much thinking effort they use.","bodyMd":"Claude Code v2.1.292, released October 6 on Anthropic's Claude Code GitHub, adds a `--marketplace <source>` flag to `claude plugin install`. A marketplace here is a catalog of plugins (add-ons that extend Claude Code) that you can add and install from. With the flag, the command adds the marketplace if needed, then installs the plugin from it.\n\nThe shortcut does not skip policy. The release notes say the marketplace is added under the same policy checks as `claude plugin marketplace add`. A related fix covers a gap on first runs: `claude plugin` commands such as `marketplace add` and `install` could run before an organization's managed settings had loaded. The release also improves the steps shown when a marketplace declared in a settings file has a name that looks like an official Anthropic marketplace.\n\nThe second headline change is an `effort` parameter on the Agent tool. A sub-agent is a helper that Claude starts to handle part of a task. Claude can now run that helper at the effort level you ask for.\n\nMods (extensions that hook into Claude Code) get prompt caching, which means reusing text already sent to the AI instead of sending it again. In `$.model.complete`, `prompt` and `system` now take blocks of text, and setting `cache: true` on a block caches the request up to it. Mods also gain a `prompt.autocomplete` event for adding rows to the prompt box's autocomplete list. Workflow agents now pass through the `agent.spawn` hook, with their run and index, so a mod can refuse them.\n\nSeveral fixes touch security and permissions. Subagent definitions with `permissionMode: auto` no longer enter auto mode when it is unavailable. Sandboxed commands can no longer read staged copies of `/ultrareview` uploads under `~/.claude/seed-admin`. PreToolUse hook approvals and auto mode no longer bypass the permission prompt for file reads from network (UNC) paths. A tampered on-disk cache of server-managed settings can no longer switch off the built-in policy plugin while the settings fetch fails.\n\nSmaller changes for daily use include a `CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS` variable for a longer backoff when retrying overloaded (529) requests. Local (stdio) MCP server connections now negotiate protocol version 2026-07-28 by default on every install, including Bedrock, Vertex and Foundry. Setting `MCP_PROTOCOL_NEGOTIATION=legacy` opts out. Servers that ignore the newer check are remembered for 7 days after one slow connect and then connected the older way without the wait.","status":"published","storyType":"news","category":"Release","clusterKey":"claude-code-2-1-292-release","slug":"claude-code-v2-1-292-lets-you-install-a-plugin-and-add-its-catalog-in-on-305971","url":"https://claudecodereview.ai/a/claude-code-v2-1-292-lets-you-install-a-plugin-and-add-its-catalog-in-on-305971/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/30597135-c327-43e1-97d2-3ffdbb210bde","role":"item","position":1,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-v2-1-292-lets-you-install-a-plugin-and-add-its-catalog-in-on-305971/90f828fb1d6282b2-c24f390d86da28e6/web_hero.webp","imageAlt":"A funnel merging a catalog and plugin into a pipe, with three tiered blocks for sub-agent effort and a looping arrow indicating prompt caching for mod extensions.","createdAt":"2026-10-07T07:22:57.402Z","updatedAt":"2026-10-07T07:30:43.576Z","sources":[{"role":"primary","title":"Claude Code v2.1.292 Adds Marketplace Plugins, Effort-Level Agents, and Mod Caching","url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.292","sourceName":"ashwin-ant","author":"ashwin-ant","publishedAt":"2026-10-06T18:59:30Z"}]},{"id":"0fc1ab7e-41ea-47a4-91c1-cef29cb7a75f","title":"Claude Code's hourly Google sign-in traced to a mismatch in how each side asks for renewal","dek":"The Google Workspace connectors (called MCP servers, the plug-ins that let Claude Code work in Gmail, Drive and Docs) drop out hourly because Claude Code never receives the key that would renew its login.","bodyMd":"A step-by-step investigation of Claude Code's Google Workspace connectors finds that the hourly sign-in comes from a disagreement between Claude Code and Google over how to ask for a long-lived login. Every sign-in lasts about an hour, then the server's tools disappear from Claude Code until you sign in again. The test used Claude Code 2.1.291 against Google's eight Workspace servers: Gmail, Drive, Docs, Sheets, Slides, Calendar, Chat and People.\n\nAn hour is normal for the first half of the login. Google's access tokens (the pass an app presents with each request) last one hour for every app. Apps that stay signed in for days also hold a refresh token, which they trade for a new access token with no browser and no user. A one-hour sign-in therefore means the app has no refresh token. The investigation's status check shows exactly that: valid tokens with 59 and 60 minutes left, and \"no\" in the refresh column.\n\nClaude Code's sign-in URL carries no `offline_access` scope and no `access_type` parameter. The MCP specification (SEP-2207) tells clients to add `offline_access` only when the authorization server lists it in `scopes_supported`. Claude Code 2.1.291 does this in one small function. Google's two metadata documents leave it out: one lists only openid, email and profile, and the other lists no scopes at all. Google does support the refresh grant, so the rule simply never fires.\n\nThe write-up then asked for `offline_access` anyway. Google answered with `invalid_scope`, the same response it gives a made-up scope. Google's own route is a separate parameter, `access_type=offline`. With that plus `prompt=consent`, the same Gmail sign-in returned a refresh token, and trading it for a new access token worked without a browser and gave the full hour with both Gmail scopes. Claude Code's oauth settings have no field for an extra authorization parameter, and pinning `offline_access` in its scopes setting breaks every sign-in.\n\nThe write-up lays out six workarounds. Claude Code's `headersHelper` setting runs a command that prints request headers. A helper script that trades a stored refresh token for a fresh access token on every call listed all 38 Gmail labels with no browser, using Claude Code 2.1.292. A helper that reused a stale token left the server connected but its tools missing. A roughly 90-line local proxy repaired a refused token inside the request and logged each call. Using gcloud needs a second, Desktop-type OAuth client and the cloud-platform scope. A domain-wide service account was not run.\n\nEach route past the hour means you hold a long-lived credential. Google's Antigravity CLI sends the parameter and renews on its own, but asks for every Gmail scope, including full mailbox access, and stores the refresh token in a mode 644 file beside the client secret. Codex CLI behaves like Claude Code and stores no refresh token. Clients sharing one OAuth client also share one grant, so revoking a Codex token signed Antigravity out, refresh token included.\n\nFor most sessions the author recommends signing in hourly, and a helper with the refresh token in a keyring for people who want to stop. The proper fix sits upstream: Google accepting `offline_access`, or Claude Code gaining a setting for extra authorization parameters. Renewal after a full hour inside one session was not timed, and the helper and proxy ran against Gmail only.","status":"published","storyType":"news","category":"Workflow","clusterKey":"claude-code-google-mcp-hourly-signin","slug":"claude-code-s-hourly-google-sign-in-traced-to-a-mismatch-in-how-each-sid-0fc1ab","url":"https://claudecodereview.ai/a/claude-code-s-hourly-google-sign-in-traced-to-a-mismatch-in-how-each-sid-0fc1ab/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/0fc1ab7e-41ea-47a4-91c1-cef29cb7a75f","role":"item","position":2,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-s-hourly-google-sign-in-traced-to-a-mismatch-in-how-each-sid-0fc1ab/7458ccceb8651b16-e717ac98ab722bc7/web_hero.webp","imageAlt":"A row of eight containers representing workspace servers with a single missing link token highlighted, illustrating the failed token renewal.","createdAt":"2026-10-07T10:18:23.071Z","updatedAt":"2026-10-07T10:30:38.489Z","sources":[{"role":"primary","title":"Debugging Claude Code and Google MCP Quirks","url":"https://dev.to/gde/debugging-claude-code-and-google-mcp-quirks-8bd","sourceName":"xbill","author":"xbill","publishedAt":"2026-10-06T23:14:29Z"}]},{"id":"fa5ec863-abe9-499b-9bbb-72ff7c5676a8","title":"VS Code 1.128 lets a Claude Agent session hold several chats at once","dek":"In VS Code's Agents window, each chat is a separate conversation with Claude, and version 1.128 lets one session hold several at once, including chats that branch off an earlier message so you can try a different direction without losing the original.","bodyMd":"VS Code 1.128 adds multi-chat to Claude Agent sessions, according to a developer's write-up titled \"VS Code x Claude Code: Multi-Chat\". Until now one session meant one chat. A session can now hold several chat threads open together, and each runs independently of the others.\n\nBefore this, one session meant one chat. To work on two things at once, you either switched between sessions and lost context, or copied context by hand into a new one. Now each parallel chat inside a session keeps its own history, its own title and its own model selection. The write-up says you need to enable Agent Host first.\n\nTo start another chat, press Ctrl+T (Cmd+T on Mac) or click the New Chat button in the top-right corner. The new thread appears below a divider that shows the previous chat's last message. You can also fork a chat. Click the fork icon on any turn of an existing conversation and a new chat starts from that exact point, then goes its own way. That gives you a place to try an alternative without disturbing the original thread.\n\nThe write-up describes three uses. The first is implementation and tests in parallel: one chat builds a feature while a peer chat writes the tests, and both share the same Changes view, so each sees the other's edits. The second is forking at a decision point, so two approaches start from identical context and you can switch back if one fails. The third is an A/B comparison. In the example, one chat tries a synchronous database ping for a health-check endpoint and another tries an asynchronous background thread. You review the Changes view from each and keep the better one.\n\nKeyboard shortcuts cover the rest. On macOS, Shift+Cmd+[ and Shift+Cmd+] move to the previous and next chat, and Cmd+W closes one. On Windows and Linux the equivalents are Ctrl+Shift+[, Ctrl+Shift+] and Ctrl+W.\n\nThe write-up is one developer's hands-on account, not release notes. It does not say whether parallel chats share usage limits or how many can run at once.","status":"published","storyType":"news","category":"Release","clusterKey":"vscode-claude-multi-chat","slug":"vs-code-1-128-lets-a-claude-agent-session-hold-several-chats-at-once-fa5ec8","url":"https://claudecodereview.ai/a/vs-code-1-128-lets-a-claude-agent-session-hold-several-chats-at-once-fa5ec8/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/fa5ec863-abe9-499b-9bbb-72ff7c5676a8","role":"item","position":3,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/vs-code-1-128-lets-a-claude-agent-session-hold-several-chats-at-once-fa5ec8/c10c3c01e0e002eb-35923da3191e0950/web_hero.webp","imageAlt":"A vertical stem branching into three tiers, with the top tier splitting into two separate lines representing a chat fork.","createdAt":"2026-10-07T10:01:14.922Z","updatedAt":"2026-10-07T10:30:46.362Z","sources":[{"role":"primary","title":"VS Code x Claude Code: Multi-Chat","url":"https://medium.com/@2084267015/vs-code-x-claude-code-multi-chat-06d3309762a1?source=rss------claude_code-5","sourceName":"golang学习记","author":"golang学习记","publishedAt":"2026-10-07T04:19:19Z"}]},{"id":"46f87716-5c47-4512-8c58-7854196d4c83","title":"A router that picks Claude model and effort per task cost $0.32 per solved task in a made-up test","dek":"On a made-up set of six coding tasks, not real usage, a router cost $0.32 per solved task against $5.10 for running everything on Fable 5.1 at max effort, a setting that makes the model think as hard as it can and costs more. A router is a piece of software that looks at each task and automatically chooses which Claude model and how much thinking effort to use for it. Effort is a setting that controls how hard the model thinks before answering, so you can trade quality for cost and speed.","bodyMd":"A short video walkthrough compares four ways of assigning Claude models to coding work. It ran the same six coding tasks at real Claude prices and reports cost per solved task. The tasks are a made-up workload rather than real usage, and the author says it is not a benchmark, so expect your own costs to differ.\n\n| Approach | Cost per solved task |\n|---|---|\n| Fable 5.1 (Anthropic's model) at max effort for everything | $5.10 |\n| Picking the model by hand, effort always high | $0.75 |\n| Cheapest model first, verify, escalate on failure | $0.45 |\n| A router picking model and effort per task | $0.32 |\n\n\"Effort\" is Claude's setting for how long the model thinks: lower effort is faster and cheaper but can be less thorough. Max effort makes the model think as hard as it can, which costs more. The router is a cheap first step, either one small model call or a few rules, that reads each task and decides which model and effort level it gets. The cheapest-model-first approach is a separate setup: it starts every task on the cheapest model, checks the result, and escalates only if the check fails. It cost $0.45 in the walkthrough, while the router cost $0.32.\n\n**The routing rules the walkthrough gives**\n\n- Easy tasks go to Sonnet (Claude Sonnet 5) on low effort.\n- Harder tasks go to Opus (Claude Opus 5.5) with more effort.\n- Fable (Claude Fable 5.1) is used only when a check fails.\n\n**How to set it up in Claude Code**\n\nUse `/model` and `/effort` to switch per task, or define subagents that each carry their own model and effort. The walkthrough does not give configuration beyond that.\n\n**Why low effort can be enough**\n\nThe walkthrough's argument is that effort buys thinking time, and a clear spec does that thinking up front. Well-specified tasks therefore often run fine on a cheaper model at low effort.\n\nThe $0.32 and $5.10 figures come from the made-up six-task workload, so treat the roughly 94% saving as that test's result rather than something to expect on your own tasks.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"model-routing-effort-tuning-cost","slug":"a-router-that-picks-claude-model-and-effort-per-task-cost-0-32-per-solve-46f877","url":"https://claudecodereview.ai/a/a-router-that-picks-claude-model-and-effort-per-task-cost-0-32-per-solve-46f877/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/46f87716-5c47-4512-8c58-7854196d4c83","role":"item","position":4,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/a-router-that-picks-claude-model-and-effort-per-task-cost-0-32-per-solve-46f877/c968cf461eb8f0dd-a1719023a9b66e39/web_hero.webp","imageAlt":"A diagram shows six task markers funneling into three ranked tiers of model settings, with a central wedge highlighting the routing process.","createdAt":"2026-10-07T07:34:11.641Z","updatedAt":"2026-10-07T08:01:55.856Z","sources":[{"role":"primary","title":"Cut Claude Code Costs 94% With Smart Model Routing and Effort Tuning","url":"https://tiktok.com/@dannie_bei/video/7693100169021099271","sourceName":"Daniyar | AI & Big Tech","author":"Daniyar | AI & Big Tech","publishedAt":"2026-10-05T08:37:52Z"}]},{"id":"c1018af5-caed-4e2c-8859-76a98c8f7b72","title":"slash-coverage shows which files each Claude Code agent has read, and how much of each","dek":"This mod, an extra piece of software you install into Claude Code, lists the files each agent has loaded and which lines of each, such as lines 1 to 180 of 1,323, so you can see what a side-task agent started by the main session actually read. An agent is a helper AI that works on a task for you inside Claude Code, and you can see what it has been reading. This is a helper AI that the main Claude Code session starts to handle a separate job, and you can check what files it looked at.","bodyMd":"slash-coverage is a Claude Code add-on (a \"mod\" in the developer's wording) that shows, for the main session and for each subagent, which files it has in its context and how much of each. A subagent is a helper agent the main session starts to handle a side task on its own. \"In context\" means the files an agent has read and can work from when it answers. The developer posted it to the r/ClaudeCode and r/ClaudeCodeMods subreddits on 7 October.\n\nEach file is listed with line ranges, written like 1-180/1323, so a partial read looks different from a full one. Files an agent never read itself, but a subagent it spawned did, are marked separately from its own reads. The mod also flags copies that went stale because another agent edited the file afterwards, and it shows tokens, re-reads and lines added or removed per file.\n\nAn all-agents view puts the agents side by side, and any agent can be left out on demand. According to the developer, everything comes from tool calls, so agents are not asked to report anything about themselves. The grid comes back when you resume a chat.\n\nThe mod is built on Claude Code's mod API, which uses function hooks. The developer says that API is early access, so the mod may break between Claude Code versions. Install it with `/plugin install slash-coverage --marketplace Davron2004/slash-coverage`. The code is on GitHub at Davron2004/slash-coverage.","status":"published","storyType":"news","category":"Ecosystem","clusterKey":"slash-coverage-mod","slug":"slash-coverage-shows-which-files-each-claude-code-agent-has-read-and-how-c1018a","url":"https://claudecodereview.ai/a/slash-coverage-shows-which-files-each-claude-code-agent-has-read-and-how-c1018a/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/c1018af5-caed-4e2c-8859-76a98c8f7b72","role":"item","position":5,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/slash-coverage-shows-which-files-each-claude-code-agent-has-read-and-how-c1018a/c674ee891e79cbe3-ed054626038b6d44/web_hero.webp","imageAlt":"A diagram shows a main central pillar with five horizontal branches, each holding a row of rectangular blocks representing files, with one block shifted to show a distinct status.","createdAt":"2026-10-07T10:03:01.945Z","updatedAt":"2026-10-07T10:30:54.464Z","sources":[{"role":"primary","title":"slash-coverage: see which files each Claude Code agent has in its context","url":"https://reddit.com/r/ClaudeCode/comments/1wzi6m4/slashcoverage_see_which_files_each_claude_code","sourceName":"/u/Xterm1na10r","author":"/u/Xterm1na10r","publishedAt":"2026-10-07T00:00:02Z"},{"role":"supporting","title":"slash-coverage: see which files each Claude Code agent has in its context","url":"https://reddit.com/r/ClaudeCodeMods/comments/1wzi7rx/slashcoverage_see_which_files_each_claude_code","sourceName":"/u/Xterm1na10r","author":"/u/Xterm1na10r","publishedAt":"2026-10-07T00:00:48Z"}]},{"id":"4cc6176e-3c87-493e-855c-f378f6270615","title":"Airlock lets one Claude Code session hand work to Claude, GPT and other AI models","dek":"Airlock, an independent add-on for Claude Code, routes requests to Claude, GPT, Grok (a model reached through its own login) and OpenRouter (a gateway to many models and the providers that serve them), while Claude Code keeps its terminal, permissions and tools; models running on your own computer are still experimental.","bodyMd":"Airlock, an independent add-on built on top of Claude Code, lets a single coding session use Claude, OpenAI's GPT models, Grok, models declared through OpenRouter, and eventually models running on your own machine. Its developer describes it in a new write-up whose examples follow version 0.1.0-beta.14. Claude Code keeps managing the conversation and the tools; Airlock adds the routing and policy that decide where each request goes.\n\nThe developer's pitch is a split of labor: Claude for one part of a task, a GPT model for another, and a local model for private data you would not want to send to a company's servers. Local support is still described as experimental, and the walkthrough says it is coming \"soon\" for explicitly configured models.\n\nThe routing works like this. When you launch a mixed session, Airlock starts a temporary program on an unused port at 127.0.0.1, an address that stays on your machine. Claude Code sends its model requests there. The program checks the exact model ID, rejects any that are unknown or disabled, and forwards the rest. Claude requests go straight to Anthropic. GPT and Grok requests go through a local proxy, claude-code-proxy, which handles their separate logins and translates between formats. OpenRouter, a gateway that serves many models from other providers, is reached directly with its own stored API key. Local models go through a strict adapter to a server you already run.\n\nThe \"main model\" handles the conversation and can pass bounded jobs to workers. A worker is a separate Claude Code Agent, one of the helper assistants Claude Code can hand a specific task, such as reviewing one module. Because Airlock reuses that built-in system, it does not need its own agent runner. Commands such as `airlock hybrid sol` or `airlock hybrid astra` pick the lead model, and named workers like airlock-sol or airlock-opus map to exact models. Built-in Plan and general-purpose agents inherit the main model unless told otherwise.\n\nAirlock also includes a local browser console, normally at http://127.0.0.1:4783, which lets a person approve moving a running session to another model, for example from Opus to Sol, without losing Claude Code's conversation or worktree. An agent can suggest the change, but only a person approves it. Separately, when a provider returns errors such as HTTP 402, 429 or 529, or a context overflow, Airlock can hand the request to another enabled model. Anthropic rate limits keep Claude Code's native wait-and-resume behavior unless you opt in, and local routes never take part in failover. A response already streaming is not replayed on another model.\n\nThe limits are plain. Airlock is still in beta. Anthropic does not officially support non-Claude models behind a Claude Code gateway, and the developer says to keep that in mind before relying on it for important work. GPT model IDs may not show in Claude Code's /model list, Claude Code's Remote Control feature is unavailable when the session uses a non-Anthropic base URL, and Claude Code decides which tools workers get. Request content still goes to Anthropic, OpenAI, Grok or OpenRouter when those routes are used. The developer's advice is to start in a small test repository with one explicit main model and one worker on a bounded task, then check which route answered.","status":"published","storyType":"news","category":"Ecosystem","clusterKey":"airlock-multi-model-session","slug":"airlock-lets-one-claude-code-session-hand-work-to-claude-gpt-and-other-a-4cc617","url":"https://claudecodereview.ai/a/airlock-lets-one-claude-code-session-hand-work-to-claude-gpt-and-other-a-4cc617/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/4cc6176e-3c87-493e-855c-f378f6270615","role":"item","position":6,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/airlock-lets-one-claude-code-session-hand-work-to-claude-gpt-and-other-a-4cc617/59cc8cc4143d7d67-425f27e5a7e9feb3/web_hero.webp","imageAlt":"A diagram showing five branching paths converging into a single pipe that divides into five target model segments.","createdAt":"2026-10-07T10:20:46.172Z","updatedAt":"2026-10-07T10:31:03.071Z","sources":[{"role":"primary","title":"A way to use different models inside the same claude code session with Airlock","url":"https://medium.com/@harshkamdar67/how-i-built-airlock-to-use-different-ai-models-inside-claude-code-94b6bd93d53d?source=rss------claude_code-5","sourceName":"Harshkamdar","author":"Harshkamdar","publishedAt":"2026-10-04T14:56:59Z"}]},{"id":"e3101774-ed6e-477a-985d-b2a7c786ed1b","title":"Five plain-text files and a hook target Claude Code context loss after compaction","dek":"The builder says their agent lost context each time it compacted, which is when Claude Code shrinks a long conversation into a short summary; their fix keeps project memory in plain-text files and uses a hook (a small script that runs automatically) to search past conversations before each message.","bodyMd":"One builder says Claude Code kept losing project context every time it compacted, which is when it condenses a long conversation into a summary to free up space. The builder was re-explaining the project every morning. The builder's fix is five plain-text files and one hook (a small script Claude Code runs automatically before each message) that together hold the project's memory.\n\n**The five files**\n\n1. **Index.** One line per thing the agent knows. It is the only memory file that loads every session, and the builder's runs about 94 lines.\n2. **Notes.** One fact per file, each with a \"Why\" and a \"How to apply\". The builder's reasoning: a rule without its reason gets skipped the first time it's inconvenient.\n3. **Diary.** Dated entries written while the agent works, not at the end, because the session can die mid-sentence.\n4. **Waiting list.** What's open, what the agent promised, and what the human has to decide. \"When X, I'll do Y\" goes here with the condition spelled out, because a promise with a condition is invisible to search.\n5. **Wake-up file.** Ten lines the next session reads first. Each morning the builder starts a clean session rather than resuming one, and types one word.\n\n**The hook**\n\nBefore each message, the hook searches every past conversation by meaning and injects a few paragraphs of matches, labelled as data rather than commands.\n\n**Getting it**\n\nThe builder published an empty template under the MIT license (a permissive license that lets you copy and change it freely) with nothing of the builder's own inside, at github.com/manyoelud/claude-code-memory-kit.\n\n**Caveats**\n\nThe builder says the setup does not make the model obey the rules: it broke one of its own the morning of the post. The waiting list is also the file the agent still gets wrong, because it only grows.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"five-files-one-hook-compaction","slug":"five-plain-text-files-and-a-hook-target-claude-code-context-loss-after-c-e31017","url":"https://claudecodereview.ai/a/five-plain-text-files-and-a-hook-target-claude-code-context-loss-after-c-e31017/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/e3101774-ed6e-477a-985d-b2a7c786ed1b","role":"item","position":7,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/five-plain-text-files-and-a-hook-target-claude-code-context-loss-after-c-e31017/6c4ae9c2395f2c11-10bcfbd3da8e3582/web_hero.webp","imageAlt":"Five vertical stacked rectangles with a single curved line bridging and connecting all five together.","createdAt":"2026-10-07T10:24:16.092Z","updatedAt":"2026-10-07T10:31:11.076Z","sources":[{"role":"primary","title":"Claude Code forgets after /compact. I stopped relying on compaction — 5 plain files + 1 hook (free template inside)","url":"https://reddit.com/r/ClaudeAI/comments/1wzmhh0/claude_code_forgets_after_compact_i_stopped","sourceName":"/u/ConsistentComment461","author":"/u/ConsistentComment461","publishedAt":"2026-10-07T03:37:44Z"}]},{"id":"afdc80bd-b0c6-402a-ba4c-6d637551c782","title":"Open-source tool pools 600+ free AI models behind one connection for Claude Code, Cursor and Codex","dek":"Free LLM API (the way one program lets other programs use it) gives coding tools one shared connection to many free AI models that read and write text, like ChatGPT, and switches to the next model when one hits its limit, its promoters say.","bodyMd":"Free LLM API, an open-source tool hosted on GitHub, connects more than 600 free AI models to one key stored on your computer, so Claude Code, Codex or Cursor can send every request through a single connection. When one free model hits its usage limit, the tool moves to the next available one, according to recent video walkthroughs of the project.\n\nThe pitch is about rate limits. Providers such as Google, Groq, Cloudflare and Nvidia each hand out free tokens (the units AI usage is metered in), but one walkthrough says you can burn through a single provider's allowance in about two minutes, and juggling separate keys across separate sites is tedious. The tool collects those providers behind one key. Another clip says it passes the earlier conversation's context to the new model on a switch, so you do not have to re-explain the task. The promoters claim up to 7.4 billion free tokens a month in total. That figure comes from the videos, not from a published quota.\n\nSetup, as shown, runs through a desktop app for Windows and Mac. One walkthrough used version 13.3 and a Windows installer, and says the repo has more than 28,000 GitHub stars. You add a provider by pasting in its API key (the access code a provider issues; some providers need none), then press a test button until the app marks the key healthy. An \"agent mode\" screen lists Claude Code, Codex, OpenCode and OpenClaw. It generates a command containing a base URL and key, which you paste into your coding tool or ask the agent to run so it configures itself.\n\nThe catch is which models you get. The model families named in the videos include ChatGPT, Gemini, GLM, Kimi and Mistral. In a video walkthrough shown with Codex, the presenter warns not to change the model once connected: the free provider's models work, but switching to a paid model means you need credits.\n\nThe tool also appears in plugin coverage. One list of five Claude Code plugins names it first, telling viewers to install it before using Claude Code and saying it switches to the next model when a usage limit runs out. A second roundup of five free open-source plugins does not name Free LLM API; it describes an unnamed item that connects Claude Code to 350+ AI providers and switches models at the limit.","status":"published","storyType":"news","category":"Ecosystem","clusterKey":"free-llm-api-fallback-router","slug":"open-source-tool-pools-600-free-ai-models-behind-one-connection-for-clau-afdc80","url":"https://claudecodereview.ai/a/open-source-tool-pools-600-free-ai-models-behind-one-connection-for-clau-afdc80/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/afdc80bd-b0c6-402a-ba4c-6d637551c782","role":"item","position":8,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/open-source-tool-pools-600-free-ai-models-behind-one-connection-for-clau-afdc80/3676385aa72565cd-5dc536c32829a43f/web_hero.webp","imageAlt":"A funneling diagram showing 600 small squares merging into one single, thick path that connects to a larger terminal point.","createdAt":"2026-10-07T07:36:02.779Z","updatedAt":"2026-10-07T08:01:41.386Z","sources":[{"role":"primary","title":"Run Claude Code, Codex and Cursor Free With This Open-Source API Tool","url":"https://www.youtube.com/watch?v=3_5XPdj6AOE","sourceName":"Ahan Tech and KRISHNA ⓥ","author":"Ahan Tech and KRISHNA ⓥ","publishedAt":"2026-10-01T14:56:00Z"},{"role":"supporting","title":"Five Claude Code Plugins That Extend What You Can Build for Free","url":"https://www.youtube.com/watch?v=dsE5X_-x8KE","sourceName":"Nick Automates","author":"Nick Automates","publishedAt":"2026-10-06T15:36:37Z"},{"role":"supporting","title":"Five Free Claude Code Plugins That Cut Token Costs and Save Context","url":"https://tiktok.com/@ai.yerzhan/video/7692828053726137621","sourceName":"Yerzhan ИИ |ai агенты | Claude","author":"Yerzhan ИИ |ai агенты | Claude","publishedAt":"2026-10-04T15:01:53Z"},{"role":"supporting","title":"Free LLM API Tool Cuts Claude Code and Cursor Costs With 600 Model Fallbacks","url":"https://instagram.com/reel/Dd9H9SYTb92","sourceName":"@woke_engineer","author":"@woke_engineer","publishedAt":"2026-10-01T14:33:04Z"}]},{"id":"d0a7ba34-032d-4b59-be09-35e7d3f9998c","title":"A Stop hook makes Claude Code answer with full file paths instead of short ones","dek":"A Stop hook is a script Claude Code runs each time it finishes a reply, and this one sends back any answer that names a file by a relative path so Claude rewrites it as an absolute one. A relative path names a file by where it sits from your current folder (like src/app.js), rather than its full address from the top of your computer.","bodyMd":"A developer found that Claude Code kept slipping on absolute paths, even with \"Always give absolute paths, never relative ones\" in CLAUDE.md, and wrote a Stop hook to enforce the rule. The hook checks every reply. If it finds a relative path, it blocks the reply, and Claude answers again with the full path. In a staged test on Windows, run with the author's own version of the hook, the answer changed from `scripts\\check.py` to `C:\\proj\\scripts\\check.py`; the author had asked for the short form so the hook had something to catch. The repo's version is a shorter stand-in with a different message. In a Linux container, that stand-in turned six files listed as `episode/script.md` and so on into `/home/dev/proj/episode/script.md` and its siblings.\n\n**How it works**\n\nClaude Code passes a Stop hook one JSON object on stdin. Two fields matter: `last_assistant_message` (the text of the final reply) and `stop_hook_active` (true when Claude Code is already continuing because of a stop hook). Printing `{\"decision\": \"block\", \"reason\": \"...\"}` on stdout keeps Claude from stopping and tells it why. Printing nothing lets the reply stand. A first attempt that printed `systemMessage` did nothing, because that field only shows a warning to the user and Claude does not act on it.\n\nThe repo's stand-in hook is 89 lines of Python with no dependencies, under the MIT licence. It flags a path only when all of these hold:\n\n- it sits inside backticks\n- it contains a `/` or a `\\`\n- it ends in a file extension\n\nAnything already absolute is skipped: `C:\\` or `C:/`, a leading `/` or `\\`, `~`, or a URL. Brace shorthand such as `src/{a,b}.ts` is flagged. The stand-in's block message reads \"Full paths only. Your reply has short paths:\" followed by the first two offenders and a count of the rest. If `stop_hook_active` is true, the hook lets the reply through rather than blocking twice. Claude Code itself allows eight stop-hook continuations in a row before it overrides the next block.\n\n**Install**\n\n1. Add a Stop entry to a settings file: `~/.claude/settings.json` for every project, `.claude/settings.local.json` for one project kept out of git, or `.claude/settings.json` to share with a repository that also contains the script. If the file already has a `hooks` object, merge the entry into it.\n2. Use the absolute path to wherever you saved the script. On Linux:\n\n```json\n{\n \"hooks\": {\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"python3 /home/you/hooks/stop_hook_full_path.py\",\n \"timeout\": 15\n }\n ]\n }\n ]\n }\n}\n```\n\nOn Windows, use `python \"C:/Users/you/hooks/stop_hook_full_path.py\"` as the command. Python must be on the PATH of the shell Claude Code uses, which is Git Bash, or PowerShell if Git Bash is not installed. Type `/hooks` in Claude Code to confirm the hook is listed. `python stop_hook_full_path.py --selftest` runs the built-in cases.\n\n**When it helps**\n\nLists are the case that hurts. A single short path is easy to work out, but six files named relative to a project folder leave you unsure where any of them live.\n\n**Limits**\n\n- The hook reads only the last reply and sees only backticked paths, so a path written without backticks gets through.\n- A path with a line number, such as `src/app.ts:12`, is not flagged.\n- A code span like `python/3.11` is flagged even though it is not a path.\n- The Windows test (Claude Code 2.1.284, Haiku 4.5) used the author's own hook version on one machine. The repo's stand-in ran in one Linux container (2.1.286). The author has not tried macOS.\n\n**Windows PowerShell gotcha**\n\nPowerShell can prepend a UTF-8 byte order mark (invisible leading bytes) to piped text, sometimes two. That makes `json.loads` fail, and a hook that swallows the error exits silently and blocks nothing. The author's fix is to read bytes and strip every mark: `sys.stdin.buffer.read().decode(\"utf-8\").lstrip(\"\\ufeff\")`. The author tested this only in Windows PowerShell 5.1 by feeding the hook manually, and did not measure what Claude Code itself writes to a hook's stdin. The write-up is an independent project, not affiliated with Anthropic.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"stop-hook-full-file-path","slug":"a-stop-hook-makes-claude-code-answer-with-full-file-paths-instead-of-sho-d0a7ba","url":"https://claudecodereview.ai/a/a-stop-hook-makes-claude-code-answer-with-full-file-paths-instead-of-sho-d0a7ba/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/d0a7ba34-032d-4b59-be09-35e7d3f9998c","role":"item","position":9,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/a-stop-hook-makes-claude-code-answer-with-full-file-paths-instead-of-sho-d0a7ba/afb7f942f45b4fb3-c3f9605e6b7e9be0/web_hero.webp","imageAlt":"A row of six short file path segments with one segment lifted out and replaced by a single, longer absolute file path.","createdAt":"2026-10-07T10:26:33.593Z","updatedAt":"2026-10-07T10:31:19.248Z","sources":[{"role":"primary","title":"A Claude Code Stop hook that makes Claude show the full file path","url":"https://dev.to/thekilteddev/a-claude-code-stop-hook-that-makes-claude-show-the-full-file-path-4lk3","sourceName":"the kilted dev","author":"the kilted dev","publishedAt":"2026-10-07T06:58:47Z"}]}],"tips":[{"id":"a1514f8d-452e-45f5-a72a-2b9592d638e2","title":"Which Claude Code project files to commit, and what goes in CLAUDE.md versus .claude","dek":"Anthropic's docs contrast CLAUDE.md, the instructions file Claude reads every session, with skills, which load only when called or relevant; the hidden .claude folder holds the rest of the project's Claude Code configuration.","bodyMd":"Claude Code's docs say what each project file does and when it loads, and that decides where an instruction belongs. The clearest contrast is between `CLAUDE.md`, the instructions file Claude reads at the start of every session, and skills, which load only when you call them or when they are relevant. Here is the layout, drawn from Anthropic's pages on memory, the `.claude` directory, skills, subagents, MCP and settings (read October 25, 2026).\n\n**CLAUDE.md: what every session needs.** Put build and test commands, naming conventions, project layout and \"always do X\" rules in `CLAUDE.md` at the repo root or in `.claude/CLAUDE.md`. Keep it under 200 lines: longer files use more context and Claude follows them less reliably. Write checkable instructions (\"Run `npm test` before committing\", not \"Test your changes\"). Run `/init` to draft one from your codebase and `/context` to confirm it loaded. Anthropic's trigger for adding a line: Claude made the same mistake twice, a code review caught something it should have known, or you retyped the same correction.\n\nCLAUDE.md is context, not enforcement. If something must happen every time, such as blocking edits to `.env`, use a hook in settings.\n\n**Everything else under `.claude`**\n\n`.claude` is the hidden project folder that holds Claude Code's configuration, skills, agents and rules.\n\n- `.claude/rules/*.md`: topic-specific instructions. A rule with `paths` frontmatter (for example `\"src/api/**/*.ts\"`) loads only when Claude reads or edits a matching file. A rule without `paths` loads at launch, with the same priority as `.claude/CLAUDE.md`. `@path` imports in CLAUDE.md still load with it, so they don't save context. Path-scoped rules do.\n- `.claude/skills/<name>/SKILL.md`: workflows and long checklists that load when called or relevant. The folder name becomes a command such as `/deploy`.\n- `.claude/agents/<name>.md`: subagents with their own system prompt, tools and optional model. They run in a separate context window and return a summary, which suits tasks that read dozens of files.\n- `.claude/settings.json`: team permissions, hooks, plugins and environment variables.\n- `.mcp.json` at the repo root: project MCP servers, added with `claude mcp add --scope project`. Each person is asked to approve them before use. Use `${API_KEY}` or `${VAR:-default}` placeholders so keys expand from each person's environment.\n\n**What to commit.** `CLAUDE.md` (or `.claude/CLAUDE.md`), `.claude/rules/`, `.claude/skills/`, `.claude/agents/`, `.claude/settings.json`, and `.mcp.json` with placeholders.\n\n**What to keep out of git.** `CLAUDE.local.md` (add it to `.gitignore`) and `.claude/settings.local.json`, which holds personal overrides and wins over the team file. Claude Code creates the latter when you pick \"Yes, and don't ask again\" on a permission prompt and adds it to your global git excludes. If you create it by hand, ignore it yourself. Files in `~/.claude` and auto memory under `~/.claude/projects/` never enter the repo.\n\n**If the repo also serves other agents.** By default Claude Code reads `AGENTS.md` only when no `CLAUDE.md`, `.claude/CLAUDE.md` or `CLAUDE.local.md` exists in the working directory or above. Adding a `CLAUDE.local.md` therefore makes Claude stop reading `AGENTS.md` for you. To keep one shared file, put `@AGENTS.md` on the first line of `CLAUDE.md` and add Claude-only notes below. Alternatively, set **Project instructions** in `/config` to `claude-md-and-agents-md` to read both. Reading `AGENTS.md` directly needs Claude Code v2.1.277 or later, so use the import on older installs.\n\nAnything under `.agents/` is not read as instructions, and the skills docs list only `.claude/skills` locations. Cursor documents reading `.claude/skills`, which makes it the one skills path both tools document.","category":"Workflow","slug":"which-claude-code-project-files-to-commit-and-what-goes-in-claude-md-ver-a1514f","url":"https://claudecodereview.ai/a/which-claude-code-project-files-to-commit-and-what-goes-in-claude-md-ver-a1514f/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/a1514f8d-452e-45f5-a72a-2b9592d638e2","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/which-claude-code-project-files-to-commit-and-what-goes-in-claude-md-ver-a1514f/88eda2ba5e65f4bd-18af441a6d0bd9f4/web_hero.webp","imageAlt":"A tall rectangular prism stands taller than a group of small, varied blocks, representing the distinction between core instructions and modular project configuration.","createdAt":"2026-10-30T03:33:49.533Z"},{"id":"012d35b5-2133-4478-8cb3-f1e7957e1fbe","title":"Keep long sessions from filling up on tool output with the Context Mode plugin","dek":"Context Mode routes raw MCP output into a sandbox and tracks session events in SQLite, which its README says keeps far less raw output from heavy browser, GitHub and log tools in your context.","bodyMd":"Context Mode is an MCP server plus a set of hooks that keeps raw tool output out of the chat. According to its README, a Playwright snapshot costs 56 KB, twenty GitHub issues cost 59 KB and one access log is 45 KB. After about 30 minutes of work, roughly 40% of a Claude Code context can be gone, and after compaction the agent can lose track of which files it was editing. Context Mode keeps the raw output in a sandbox so only a small result reaches the conversation. It also records session events in SQLite so work survives compaction.\n\n## Set it up\n\nYou need Claude Code v1.0.33 or newer (`claude --version`). If `/plugin` is not recognized, update with `brew upgrade claude-code` or `npm update -g @anthropic-ai/claude-code`.\n\n1. **Install.** Inside Claude Code run `/plugin marketplace add mksglu/context-mode`, then `/plugin install context-mode@context-mode`. Restart Claude Code or run `/reload-plugins`.\n2. **Verify.** Run `/context-mode:ctx-doctor`. Every check should show `[x]`. It validates runtimes, hooks, FTS5 and plugin registration. Fix anything red first, because the routing hooks are what make the savings automatic.\n3. **Let the model write code instead of reading files.** Routing is automatic: a SessionStart hook injects instructions at runtime, so nothing is written into your project. The README's example replaces 47 `Read()` calls (700 KB) with one `ctx_execute()` script that prints only line counts (3.6 KB). The README quotes 315 KB shrinking to 5.4 KB for sandboxed output. Those are the project's own numbers, so measure yours.\n4. **Measure.** `/context-mode:ctx-stats` shows a per-tool breakdown, tokens consumed and the savings ratio. For a live meter, add this to `~/.claude/settings.json` and restart:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"context-mode statusline\"\n  }\n}\n```\n\n5. **Index docs you keep re-reading.** `/context-mode:ctx-index` loads a local file or directory into a persistent FTS5 knowledge base. `/context-mode:ctx-search` then returns only the relevant passages through BM25 search. `/context-mode:ctx-purge` permanently deletes everything indexed.\n\n## Try it without the plugin\n\n`claude mcp add context-mode -- npx -y context-mode` adds only the MCP server. You get all 11 tools but no automatic routing or slash commands, so the model is not nudged away from raw Bash, Read and WebFetch and savings are smaller. It works as a low-commitment test.\n\n## When it is worth it\n\nThe plugin targets long sessions that lean on browser, GitHub or log-heavy MCP tools and keep hitting compaction. For short sessions, the write-up says the overhead is not worth it.\n\nOne caution from the README: if you do not start with `--continue`, previous session data is deleted immediately, so a fresh session is a clean slate. After a compaction, Context Mode indexes the recorded events (file edits, git operations, tasks, errors, decisions) and retrieves only what is relevant rather than replaying the history.","category":"Workflow","slug":"keep-long-sessions-from-filling-up-on-tool-output-with-the-context-mode-012d35","url":"https://claudecodereview.ai/a/keep-long-sessions-from-filling-up-on-tool-output-with-the-context-mode-012d35/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/012d35b5-2133-4478-8cb3-f1e7957e1fbe","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/keep-long-sessions-from-filling-up-on-tool-output-with-the-context-mode-012d35/64ab7afaa95425f6-2859cb9dfee6cb92/web_hero.webp","imageAlt":"A funneling graphic showing forty-seven rectangular blocks passing through a narrow aperture into one single, small cube.","createdAt":"2026-10-30T03:31:19.263Z"},{"id":"a3b34cbb-9e00-4643-bdea-82b6d27706e5","title":"Shrink test logs and JSON output before they hit your token bill","dek":"Headroom, an open-source local proxy (a program on your machine that sits between Claude Code and the model), compresses logs and tool output, including JSON and token-heavy text, before it is sent, and one command wraps your sessions.","bodyMd":"Test runs, build logs, large JSON (the structured data format many tools print) and long diffs go back to the model on every step, and you pay for those tokens each time. Tokens are the units of text the model bills by. Headroom is an open-source tool that sits between Claude Code and the model and compresses that material first. Its README gives one example: a log that costs 10,144 tokens shrinks to 1,260 while the same fatal error is still found.\n\nCompression runs on your machine. Headroom routes each piece of content to a fitting compressor (one for JSON, one that understands code structure, a text model for prose) and caches the originals locally. The model gets a `headroom_retrieve` tool to pull back the full text when it needs it. Headroom flags content that would break your provider's prompt cache but does not rewrite your prompts.\n\n## Setup\n\n1. Install the CLI with `uv tool install --python 3.13 \"headroom-ai[all]\"` or `pip install \"headroom-ai[all]\"`. The npm package (`npm install headroom-ai`) is the TypeScript SDK only and has no CLI.\n2. Run `headroom wrap claude`. It starts a local proxy (a program on your machine that sits between Claude Code and the model), installs the Serena MCP server for semantic code navigation (registered for the wrapped project only) and launches Claude Code routed through Headroom. Launch Claude Code this way each session. To back out, run `headroom unwrap claude`.\n3. Check it works: `headroom doctor` confirms routing, `headroom perf` shows compression stats, and `headroom dashboard` shows live savings while the proxy is running. Run `doctor` first.\n4. If you would rather not wrap anything, run `headroom proxy --port 8787` and point your tools at it. Anything that can set an API base URL can use it, including your own scripts.\n5. Optionally, run `headroom learn`. It mines failed sessions and writes corrections to `CLAUDE.local.md` (gitignored) by default, or to `CLAUDE.md` or `AGENTS.md` if you choose. Review what it proposes before committing it to a shared file.\n\n## When it pays off\n\nLong sessions on a large repo, usage limits you keep hitting, or per-token billing are the cases where a quick trial makes sense. Sessions heavy on test runs, build logs and large JSON compress well. A session of short prompts will not move much.\n\n## Caveats\n\nThe 10,144 to 1,260 figure is the README's own example, not a benchmark of your repo, so measure with `headroom perf` on real sessions. Headroom also adds a local proxy to your setup, one more moving part when something breaks. The same `wrap` command works for Codex, Cursor, Aider, Cline, Goose and OpenHands.","category":"Workflow","slug":"shrink-test-logs-and-json-output-before-they-hit-your-token-bill-a3b34c","url":"https://claudecodereview.ai/a/shrink-test-logs-and-json-output-before-they-hit-your-token-bill-a3b34c/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/a3b34cbb-9e00-4643-bdea-82b6d27706e5","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/shrink-test-logs-and-json-output-before-they-hit-your-token-bill-a3b34c/5aa2e890dcb437f0-544c3236601d11e5/web_hero.webp","imageAlt":"A wide funnel feeds three types of data blocks into a single narrow tube, where a clay-orange filter section represents compressed data output.","createdAt":"2026-10-29T21:58:29.261Z"},{"id":"bbbd9b99-2dd4-4c09-9d14-30e77a90254a","title":"Catch file changes a PostToolUse hook misses with a Stop hook that asks git","dek":"In a scripted test, a PostToolUse hook matching Edit|MultiEdit|Write saw 3 of 7 file changes, while a Stop hook running git status saw all 7.","bodyMd":"In a scripted test, a PostToolUse hook matched on `Edit|MultiEdit|Write` saw only the changes made through Claude's file tools. On Claude Code 2.1.312, it caught 3 of 7 changes. The four it missed were made through Bash: `sed -i`, a `>` redirect, `rm` and `git mv`. A Stop hook that runs `git status` listed all seven, including the delete and the rename.\n\nA quick gloss on the terms: a hook is a script Claude Code runs automatically at set points. A PostToolUse hook runs after each tool call, and a Stop hook runs when Claude finishes. Git is the version-control tool that tracks uncommitted changes in a repo, and `git status` lists them.\n\nThe test used a scripted fake model (a local server standing in for the Messages API) that issued a fixed list of tool calls against the real Claude Code binary, so no API key was needed. A real model picks its own routes, and seven routes are a sample, not a census.\n\n**Add the git-backed Stop hook**\n\n1. Create `.claude/stop-check.sh`:\n\n```\ngit status --porcelain -uall > .git/hk-status\ngrep -q '\"stop_hook_active\":true' && exit 0\n[ -s .git/hk-status ] || exit 0\ncat .git/hk-status >&2\nexit 2\n```\n\n2. Register it in `.claude/settings.json` as a `Stop` hook with the command `cd \"$CLAUDE_PROJECT_DIR\" && sh .claude/stop-check.sh`.\n\nThe `cd` matters because hooks run in Claude's current directory, which moves when Claude runs `cd`. Exit code 2 tells Claude Code not to stop yet and passes stderr to the model, so Claude sees the list of changed files before it finishes. The `stop_hook_active` check lets the second stop through, so the hook can't loop. In the test, this cost one extra model call and delivered all seven status lines.\n\n**Why adding Bash to the matcher doesn't fix it**\n\nMatching `Edit|Write|Bash` makes the hook fire on the four Bash changes. But those payloads hold the command string, with no `file_path` and no patch. To learn which files `rm` or `git mv` touched, the hook would have to parse shell.\n\n**New files arrive with an empty patch**\n\nA file created with Write reports `type=create` and `structuredPatch=[]`; the text sits in `tool_response.content`. A hook that reviews `structuredPatch` sees nothing for new files, so read `content` when `type` is `create`.\n\n**Worth using when** a review loop depends on knowing what Claude changed. Keep PostToolUse for instant per-edit checks, since Stop only runs when Claude finishes.\n\n**Limits**\n- Git skips gitignored files, files outside the repo, and anything Claude commits itself.\n- The hook also lists your own uncommitted work.\n- `MultiEdit` did not appear in the request Claude Code 2.1.312 sent the model, so it widens nothing.\n- `NotebookEdit` appears as a deferred tool and the usual matcher doesn't name it; its payload wasn't tested.\n- PostToolUse behavior in subagents wasn't tested.","category":"Workflow","slug":"catch-file-changes-a-posttooluse-hook-misses-with-a-stop-hook-that-asks-bbbd9b","url":"https://claudecodereview.ai/a/catch-file-changes-a-posttooluse-hook-misses-with-a-stop-hook-that-asks-bbbd9b/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/bbbd9b99-2dd4-4c09-9d14-30e77a90254a","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/catch-file-changes-a-posttooluse-hook-misses-with-a-stop-hook-that-asks-bbbd9b/77803526806d849e-d986ba588b19e4b0/web_hero.webp","imageAlt":"A diagram shows seven file blocks being caught by a container versus a sieve that only catches three.","createdAt":"2026-10-29T21:56:56.756Z"},{"id":"8d01e30d-2c9d-4811-9baa-5d6f7de00bfd","title":"See every waiting session, subagent and Codex run that Agent View leaves off its list","dek":"Agent View only lists background sessions, so a JSON command, a Notification hook or ccdeck, a free, open-source dashboard that runs on your machine and shows Claude Code and Codex sessions, has to cover the rest.","bodyMd":"Agent View, opened with `claude agents`, is one screen for background sessions. Anthropic's documentation says interactive sessions open in other terminals don't appear until you background them, and that subagents and teammates a session spawns aren't listed as separate rows. Codex isn't listed either. The feature is in research preview, and a row shows only the session's name, current activity and age: no spend or quota.\n\nTwo terms used below: a subagent is a helper session that a main Claude Code session spawns. Codex is a separate coding-agent CLI that has its own `codex agents` dashboard and writes rollout files under `~/.codex/sessions`.\n\nThree ways to see the rest:\n\n1. **Poll `claude agents --json`.** In Claude Code 2.1.312 the command prints active sessions, interactive and background, as a JSON array. Each entry has a `kind` and, while its process is alive, a `status` of `busy`, `waiting` or `idle`. A waiting session adds `waitingFor`, such as `permission prompt` or `input needed`. Filter it with jq: `claude agents --json | jq '.[] | select(.status == \"waiting\")'`. It lists sessions, not subagents, and it is a snapshot, so poll it to keep it current.\n\n2. **Add a `Notification` hook** to `~/.claude/settings.json`. It applies to every session that reads that file, whichever terminal started it. Match `permission_prompt|idle_prompt` and have the hook command append one line per wait to a log, for example with `jq -c` writing to `~/.claude/waiting.log`. Notification hooks can't block or modify notifications, so this only observes.\n\n3. **Run a dashboard.** ccdeck, a free, open-source dashboard, starts with `npx ccdeck`. Its first run adds a hook to `~/.claude/settings.json`, so sessions from any terminal report to it. Each subagent gets its own card joined to its session, and Codex CLI sessions appear on the same canvas, read from the rollout files under `~/.codex/sessions`. The topbar names Claude Code sessions stopped on a prompt or question, with how long each has waited. It also shows estimated spend per session. `ccdeck sessions` prints the waiting list in a terminal.\n\nFor subagents without a dashboard, hooks from settings files also run inside subagents. Tool events such as `PreToolUse` carry `agent_id` and `agent_type` when a subagent made the call, and `SubagentStart` and `SubagentStop` mark each one's life.\n\n**When to use which.** Dispatch and reply in Agent View. Poll the JSON if all you need is who is waiting in any terminal. Add a hook or dashboard when you want subagents, Codex or spend alongside.\n\n**Limits.** ccdeck can't reply, start or attach to sessions, because its hook is a one-way forwarder. It keeps nothing while no deck is running. Its waiting list covers Claude Code only, and the tool name beside a wait is its inference. Codex logs record no approval request, so a running Codex session shows \"approvals not visible\". Because the hook only observes, it doesn't change what Agent View does, and background sessions read user settings, so they report too.","category":"Workflow","slug":"see-every-waiting-session-subagent-and-codex-run-that-agent-view-leaves-8d01e3","url":"https://claudecodereview.ai/a/see-every-waiting-session-subagent-and-codex-run-that-agent-view-leaves-8d01e3/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/8d01e30d-2c9d-4811-9baa-5d6f7de00bfd","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/see-every-waiting-session-subagent-and-codex-run-that-agent-view-leaves-8d01e3/00195507b7b60ff9-5f4c5c671f925426/web_hero.webp","imageAlt":"A diagram shows rectangular session strips, square subagent tiles, and circular coding-agent discs being connected by a single line into a unified cluster.","createdAt":"2026-10-29T21:52:06.001Z"}]}