{"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":"eedeb4ac-05e0-42d8-969f-b6a8ae9b70ee","date":"2026-10-14","status":"open","createdAt":"2026-10-13T17:21:47.268Z","storyCount":6,"newsletterSubject":"Parallel cloud jobs run offline, Skip reprocessing while subagents wait, Query multiple apps in one script"},"updatedAt":"2026-10-14T20:00:36.176Z","stories":[{"id":"7214dd77-3d05-4123-818c-a43e73f3f2f6","title":"Split one big goal into parallel cloud coding jobs that keep running with your laptop closed","dek":"Projects, now in beta for Pro and Max plans, has Claude break a large goal into tasks and run each in its own cloud session on a separate copy of your code.","bodyMd":"In a video published October 9, Anthropic introduced Claude Code Projects, a way to hand Claude a goal too big for one session and let it split the work. A project is one ongoing conversation where Claude coordinates the job. You give it a list of tasks (or ask it to explore your repos and propose some), and it starts a thread for each one.\n\nA thread is its own full Claude Code session, running on its own branch in the cloud. A branch is a separate copy of your project, so your main version stays untouched. Because the work lives in the cloud, it keeps going after you close your laptop, and you can check in from your phone. If a task needs your local files or tools, you can ask Claude to run that thread on your computer instead.\n\nWhen a thread has a concrete change ready, such as a bug fix, it opens a pull request on its own or whenever you ask. It then keeps watching that request: it pushes fixes when CI (the automatic tests and checks that run after a change) fails, and it addresses review comments. The main conversation shows the next step for each pull request, a pull requests tab in the overview lists them all with their status, and you can ask Claude to merge when you are ready.\n\nAnthropic's walkthrough points to work that spans many sessions or several repos: migrating an app off a deprecated package, or updating one endpoint across API, web and mobile repos. Its demo project investigates a run of website performance problems. Claude also writes a shareable summary with before and after metrics, stored in the project's library tab, a shared folder every thread can read. Connected to a monitoring service, Claude can set up a daily routine that checks for regressions and opens a thread to investigate when it finds one.\n\nTo start, open the Claude tab on desktop or the web app, create a new project, and enter a name, a goal and the relevant repos or folders. You then land in the main conversation, where you can click a thread's card to follow it, steer it by talking in the thread, or stop it. The threads tab shows any waiting on you.\n\nCost is the catch. Every thread is a full session and a project can run several at once, so it burns plan limits faster than a single session. Anthropic's Claude Code team suggests leaving the coordinator on low effort, since it mostly routes work, and defaulting threads to a smaller model for well-scoped tasks, switching up for larger ones. Both are set in project settings. You can also tell Claude how many threads to run at once, how often to update you, or to show a plan first, and threads share memory that you can edit in project settings. One community account, Vox, says that in a new project every thread runs on Opus at high effort by default, and that a thread hitting a limit waits for the reset and continues on its own. Either way, check the model and effort settings in project settings before sending a big batch.\n\nProjects is in beta and rolling out gradually to Pro and Max plans. Anthropic's ClaudeDevs account says users who have not been admitted can join a waitlist, and that it is letting in more as capacity allows.","status":"published","storyType":"news","category":"Release","clusterKey":"claude-code-projects-parallel-cloud-threads","slug":"claude-code-projects-splits-one-big-goal-into-several-coding-jobs-that-r-7214dd","url":"https://claudecodereview.ai/a/claude-code-projects-splits-one-big-goal-into-several-coding-jobs-that-r-7214dd/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/7214dd77-3d05-4123-818c-a43e73f3f2f6","role":"lead","position":0,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-projects-splits-one-big-goal-into-several-coding-jobs-that-r-7214dd/bc3239465e725e3f-5bbb04426abeb151/web_hero.webp","imageAlt":"A diagram shows one central line splitting into four parallel branches, each ending in a small square block to represent separate coding sessions.","createdAt":"2026-10-10T00:29:23.322Z","updatedAt":"2026-10-14T14:15:10.779Z","sources":[{"url":"https://x.com/ziwenxu_/status/2108635337761194355","title":null,"sourceName":"x.com","author":"Ziwen","publishedAt":"2026-10-09T19:06:55.000Z","role":"primary"},{"url":"https://x.com/ClaudeDevs/status/2108621479164412232","title":null,"sourceName":"x.com","author":"ClaudeDevs","publishedAt":"2026-10-09T18:11:51.000Z","role":"primary"},{"url":"https://x.com/Voxyz_ai/status/2108635045527515434","title":null,"sourceName":"x.com","author":"Vox","publishedAt":"2026-10-09T19:05:46.000Z","role":"primary"},{"url":"https://www.youtube.com/watch?v=omihvjf0A2k","title":null,"sourceName":"www.youtube.com","author":"Claude","publishedAt":"2026-10-09T19:49:09.000Z","role":"primary"}]},{"id":"8229ac33-a1c4-4fb1-835d-6e9ca3f412d4","title":"Stop paying to reprocess context when a subagent waits on tests or builds","dek":"Claude Code's subagents (helper agents it spawns for side tasks) lose their saved copy of the conversation after five idle minutes, and a two-line setting in the subagent's file extends that to an hour.","bodyMd":"Claude Code reuses a saved copy of the conversation (the cache) so it does not reread everything on each step. For subagents, that copy expires after 5 minutes with no activity. If a subagent runs a test suite or waits on a build and sits idle longer than that, its next step has to reprocess the whole context from scratch. That is slower than reading from the cache and counts more against your usage limits.\n\n**Set a longer cache on the subagent that waits**\n\nAdd two lines at the top of the subagent's file, with the second indented under the first:\n\n```\nexperimental:\n cacheTtl: 1h\n```\n\nIf the file already has an `experimental:` block, add `cacheTtl` under it rather than writing a second block. Setting `cacheTtl` on a single subagent needs Claude Code 2.1.248 or later; `claude --version` shows what you have.\n\n**When to use it**\n\nUse it for subagents that sit idle for more than 5 minutes partway through, such as running tests, building or waiting on CI, or ones you will resume later. Leave subagents that run straight through and finish in a few minutes on the default.\n\nThe reason to be selective is price. The official docs, as quoted in the tip, say 1-hour cache writes cost 2x the base input price at API rates, against 1.25x for 5-minute writes. A subagent that never pauses gets nothing from the longer cache and just costs more.\n\n**Other limits**\n\n- A `subagentPromptCacheTtl` entry in your settings overrides every subagent's own setting, and it also changes workflows and compaction. To set subagents one by one, delete it first.\n- The main session has the same 5-minute limit on an API key, a cloud provider, or a subscription that is past its limit and drawing on usage credits. If you often step away mid-session there, set `promptCacheTtl` to `1h`.\n- On a 1M-context model such as Opus 5.5, compaction by default does not start until about 967K tokens, so every message carries the whole conversation until then. Running `/autocompact 400k` once makes it compact at 400K.\n\nThe prompt-caching page in the official docs is at code.claude.com/docs/en/prompt-caching.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"subagent-cache-1-hour-setting","slug":"claude-code-helper-agents-that-wait-on-builds-can-keep-their-saved-conte-8229ac","url":"https://claudecodereview.ai/a/claude-code-helper-agents-that-wait-on-builds-can-keep-their-saved-conte-8229ac/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/8229ac33-a1c4-4fb1-835d-6e9ca3f412d4","role":"item","position":1,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-helper-agents-that-wait-on-builds-can-keep-their-saved-conte-8229ac/2f12e45ad63b6af4-63580df485fc8554/web_hero.webp","imageAlt":"A row of twelve rectangular blocks, with one block lifted out and extended to be significantly taller than the others.","createdAt":"2026-10-11T09:39:54.098Z","updatedAt":"2026-10-14T14:26:39.920Z","sources":[{"url":"https://x.com/Voxyz_ai/status/2109056129884123370","title":null,"sourceName":"x.com","author":"Vox","publishedAt":"2026-10-10T22:59:00.000Z","role":"primary"},{"url":"https://x.com/daniel_mac8/status/2108903166884368408","title":null,"sourceName":"x.com","author":"Dan McAteer","publishedAt":"2026-10-10T12:51:11.000Z","role":"primary"},{"url":"https://tiktok.com/@aidive.dev/video/7694367459868003606","title":null,"sourceName":"tiktok.com","author":"aidive","publishedAt":"2026-10-08T18:35:35.000Z","role":"supporting"},{"url":"https://x.com/kevinkern/status/2108559704263721121","title":null,"sourceName":"x.com","author":"Kevin Kern","publishedAt":"2026-10-09T14:06:23.000Z","role":"supporting"},{"url":"https://x.com/diegohaz/status/2108662928501035481","title":null,"sourceName":"x.com","author":"Haz","publishedAt":"2026-10-09T20:56:33.000Z","role":"supporting"}]},{"id":"53f0d02d-81b2-4c00-aca5-cb41a66cb366","title":"Have Claude query several connected apps in one script, then keep only the answer","dek":"The open-source claude-code-mode plugin lets Claude write a single program that calls tools like Jira through MCP, the standard connector that lets Claude talk to outside apps, and runs it in a sandbox, a walled-off space where code executes without touching real files, so only the final result enters the limited amount of text Claude keeps in view during a conversation.","bodyMd":"Claude Code normally talks to connected tools, Jira, GitHub, Slack and the like, through MCP, a standard connector that lets the model call outside apps and get data back. The problem is that every call and its full response lands in Claude's context: the limited amount of text it keeps in view while working. Query a few tools in a row and that context fills up fast with raw records Claude never actually needed to see.\n\nThe claude-code-mode plugin, posted to GitHub by developer gabe4coding, changes where that filtering happens. Instead of Claude pulling data from each MCP tool one call at a time and reading every response, it writes one JavaScript program that makes all the calls, filters and combines the results inside a sandbox (an isolated space where the code runs without touching your actual files), and returns only the final value. The intermediate data, the full Jira tickets or GitHub issues, never reaches Claude's context at all.\n\nThe plugin's own example is a Jira query: find every issue that hasn't been updated in 14 days and return just the titles. Normally that means Claude reading full issue records for every match. With claude-code-mode, the filtering logic runs in the sandbox and Claude only sees the short list of titles that comes back.\n\nTo try it, install claude-code-mode from its GitHub repository as a Claude Code plugin, then give Claude a multi-step, multi-tool request and let it write the script itself rather than calling each tool directly. Existing MCP permission checks still apply to every call the generated script makes, so the plugin doesn't change what Claude is allowed to access, only how much of what comes back gets kept.\n\nThe project is MIT-licensed, and its claims about cutting token usage and isolating execution in the sandbox haven't been independently verified. The clearest case for reaching for it is any task that would otherwise mean pulling large records from several connected apps just to extract a handful of fields.","status":"published","storyType":"news","category":"Ecosystem","clusterKey":"claude-code-mode-mcp-sandbox-plugin","slug":"open-source-plugin-has-claude-code-query-connected-apps-in-one-script-an-53f0d0","url":"https://claudecodereview.ai/a/open-source-plugin-has-claude-code-query-connected-apps-in-one-script-an-53f0d0/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/53f0d02d-81b2-4c00-aca5-cb41a66cb366","role":"item","position":2,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/open-source-plugin-has-claude-code-query-connected-apps-in-one-script-an-53f0d0/6a5bc56ff1da5ff8-f0cfe95a5845d14c/web_hero.webp","imageAlt":"A diagram shows five blocks funnelling into a single, smaller square to represent the filtering of data.","createdAt":"2026-10-13T15:35:01.082Z","updatedAt":"2026-10-14T15:51:29.828Z","sources":[{"role":"primary","title":"Open-source Claude Code plugin keeps intermediate MCP results out of the model’s context","url":"https://reddit.com/r/aigossips/comments/1x3u2tg/opensource_claude_code_plugin_keeps_intermediate","sourceName":"/u/call_me_ninza","author":"/u/call_me_ninza","publishedAt":"2026-10-12T06:02:06Z"}]},{"id":"3c7d0141-e8d2-4b72-beb5-8695fcfba293","title":"Claude Code's opusplan option plans with Opus and builds with Sonnet","dek":"Starting Claude Code with `claude --model opusplan` uses the costlier Opus model while you plan, then hands the actual coding to Sonnet.","bodyMd":"Claude Code has a built-in model option called `opusplan` that splits a task between two models. Start a session with:\n\n```\nclaude --model opusplan\n```\n\nIn Plan Mode, Claude Code uses Opus (Claude Opus 5.5) to investigate the problem, weigh tradeoffs and design the change. When you leave Plan Mode and move to execution, it switches to Sonnet (Claude Sonnet 5.5) to implement the approved plan. A walkthrough shared on Reddit says this behavior is documented, not a prompt trick.\n\n**Adding Haiku helpers**\n\nThe flag does not set up a third tier. The walkthrough suggests creating custom subagents (separate helper agents with their own instructions) that run on Claude Haiku 5.5 for focused supporting jobs. Custom subagents accept `model: haiku` and their own tool restrictions. Project-level subagents live in `.claude/agents/`, where their descriptions guide when Claude delegates and their frontmatter sets the model and tools.\n\nThe walkthrough proposes three:\n\n- `search`: maps the repository, with read-only tools.\n- `tests`: runs approved test commands and reports failures, without editing source files.\n- `docs`: retrieves relevant API documentation, with no file edits.\n\nIt also offers a setup prompt you can paste into Claude Code. It asks Claude to inspect your existing configuration, propose `opusplan` as the default model with effort set to high (after verifying the supported setting names), draft the three subagents with clear descriptions and minimal tools, and add a rule to `CLAUDE.md`: \"Use Plan Mode before new features, significant design tradeoffs, and bugs that survive the first attempted fix.\" The prompt tells Claude to preserve unrelated settings, explain permission changes, show every change as a diff first, and not edit files or run tests until you approve.\n\n**When to go back to planning**\n\nThe walkthrough's rule of thumb is to return to Plan Mode before a new feature, before a design decision with meaningful tradeoffs, and when the first attempted bug fix fails. The aim is to rethink the approach before generating another round of edits.\n\n**Caveats**\n\nModel aliases depend on your provider and Claude Code version. The walkthrough says the current documentation lists Opus 5.5, Sonnet 5.5 and Haiku 5.5 for the Anthropic API, but other providers may resolve the aliases differently. Subagents still consume usage, and routing work to Haiku can help control cost without guaranteeing a cheaper session or better code. The author asks whether anyone has compared the setup with Sonnet-only on the same task for cost, completion time and fixes required. No such comparison is given.\n\nThe walkthrough points to the model configuration and subagent pages in Anthropic's Claude Code docs.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"claude-code-opusplan-mode","slug":"claude-code-s-opusplan-option-plans-with-opus-and-builds-with-sonnet-3c7d01","url":"https://claudecodereview.ai/a/claude-code-s-opusplan-option-plans-with-opus-and-builds-with-sonnet-3c7d01/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/3c7d0141-e8d2-4b72-beb5-8695fcfba293","role":"item","position":3,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/claude-code-s-opusplan-option-plans-with-opus-and-builds-with-sonnet-3c7d01/323e72e539b2f881-262bb454c273640a/web_hero.webp","imageAlt":"A diagram shows a branching path separating two large shapes at the top, with three smaller, individual shapes lined up in a row below them.","createdAt":"2026-10-13T22:20:23.043Z","updatedAt":"2026-10-13T22:30:37.457Z","sources":[{"role":"primary","title":"Claude Code has an opusplan mode: Opus plans, Sonnet builds. Here’s the setup.","url":"https://reddit.com/r/SATNA_PROJECT/comments/1x50yo9/claude_code_has_an_opusplan_mode_opus_plans","sourceName":"/u/ZookeepergameMost817","author":"/u/ZookeepergameMost817","publishedAt":"2026-10-13T16:15:09Z"}]},{"id":"ab88e016-925f-4ab2-926c-f98c30da72f7","title":"Opus 5.5 and Sonnet 5.5 prompting: drop \"think step by step\" and tell Claude when to stop","dek":"Two video walkthroughs both say to describe the outcome and define what \"done\" looks like; one adds a line to CLAUDE.md, a file in your project where you write standing instructions Claude reads every time it works on your code, telling Claude to keep going unless it needs you or an action is destructive.","bodyMd":"Two walkthroughs on prompting Claude Code with Opus 5.5 and Sonnet 5.5 land on similar advice: say what you want, say what done looks like, and drop habits written for older models. The tips below are separate, in the order the sources give them.\n\n**Delete \"think step by step\" and similar lines.** One walkthrough, drawing on an Anthropic guide to Opus 5.5, says to remove phrases like \"think carefully\" or \"think step by step\" from prompts and skills. Opus 5.5 always thinks before replying and decides how much. The walkthrough says Anthropic tested this: removing those lines made Claude start replying sooner with no clear drop in quality. A second walkthrough says the same about \"make no mistakes\" and \"double check your work,\" which it says the newer models do by default.\n\n**Describe the goal and give a finish line.** Instead of staging a long job, send the whole task in one message and define done. In Anthropic's example, a payment migration is finished when every endpoint uses the new client, the old one is deleted and all tests pass. The walkthrough suggests adding a line such as \"only stop if a test fails for a reason you can't explain.\" The second walkthrough applies this to a double-charging bug: rather than a rigid instruction like \"after someone clicks buy, disable the payment button,\" write the goal (\"a user should only be charged once per order\") and then what done looks like.\n\n**Add a \"keep going\" line to CLAUDE.md.** CLAUDE.md is the file of standing instructions Claude Code reads. The walkthrough says Anthropic finds Opus 5.5 occasionally stops to report something instead of carrying on. The suggested fix is a rule saying when to stop and when to continue, for example \"keep going unless you need me or unless it's something destructive.\" That should mean fewer needless stops while still pausing when you want it to.\n\n**Type follow-ups instead of interrupting.** Long runs make a restart more expensive. The walkthrough says that if you remember something mid-run, you can type your follow-up in Claude Code and it will be read once the current step finishes, without stopping the run.\n\n**Split big jobs across subagents and keep a task file.** For an audit or migration across a large codebase, the walkthrough suggests asking Claude to split the work across subagents and check each result before accepting it. It says this keeps each agent's context smaller. It also suggests having Claude track its tasks in a file such as task.md, because long runs fill the context window and Claude Code summarizes old turns, which can lose detail. A file survives that, and you can open it to see what is done and what is left.\n\n**Read the summary's \"needs from you\" part first, then review.** The walkthrough says a final summary covers what Claude did, found and needs from you, and suggests a CLAUDE.md line asking every run to end with three headings: blocked on me, changed, and found. A summary only reports what Claude thinks it did, so the guide also suggests having Opus 5.5 review a diff before a person does, listing only problems that would block a merge, with file and line, why it is wrong and how to show it fails. The walkthrough's author only partly agrees and prefers a different model as reviewer, such as OpenAI's GPT-6 Astra.\n\n**If a message is flagged, edit it.** The walkthrough says Opus 5.5 is the first Opus model with \"Fable-level\" biology and cyber safeguards, which make it more cautious than Opus 5 and can flag legitimate work, such as looking for vulnerabilities in your own code. Claude may then move you to an older model. In Claude Code you can press Escape twice to edit your last message and make clear it is your own codebase. Prompts about showing Claude's internal reasoning are one flag category. A setting lets Claude switch models automatically or ask first. If you switch back to Opus 5.5 in the same thread, the earlier message may trigger a flag again, so a new thread is safer.\n\n**Ask for a quick answer.** Fast mode uses the same model but needs extra usage turned on and costs more per token. The walkthrough instead suggests simply telling Claude to \"answer quickly\" or \"answer directly.\"\n\n**Pair Opus 5.5 with Sonnet 5.5.** The second walkthrough recommends Opus 5.5 for open-ended work that needs judgment, such as production code or system design, and Sonnet 5.5 for faster, cheaper work with a clear scope, such as bug fixes, features or documents. It says Sonnet 5.5's agentic coding benchmarks score nearly 7 times higher than Sonnet 5. Its author uses Opus to plan and Sonnet for the legwork.","status":"published","storyType":"roundup","category":"Workflow","clusterKey":"prompting-opus-sonnet-5-5-in-claude-code","slug":"opus-5-5-and-sonnet-5-5-prompting-drop-think-step-by-step-and-tell-claud-ab88e0","url":"https://claudecodereview.ai/a/opus-5-5-and-sonnet-5-5-prompting-drop-think-step-by-step-and-tell-claud-ab88e0/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/ab88e016-925f-4ab2-926c-f98c30da72f7","role":"item","position":4,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/opus-5-5-and-sonnet-5-5-prompting-drop-think-step-by-step-and-tell-claud-ab88e0/f0e533621fa2a7f2-cb83e8ef214798df/web_hero.webp","imageAlt":"A visual representation of a chain with a single link broken in the middle to symbolize removing outdated instructions.","createdAt":"2026-10-10T06:16:50.912Z","updatedAt":"2026-10-10T06:31:19.032Z","sources":[{"role":"primary","title":"How to Prompt Opus 5.5 in Claude Code for Long Coding Tasks","url":"https://www.youtube.com/watch?v=5TNXByrtHc4","sourceName":"Better Stack","author":"Better Stack","publishedAt":"2026-10-05T16:00:39Z"},{"role":"supporting","title":"How to Split Claude Code Work Between Opus 5.5 and Sonnet 5.5","url":"https://www.youtube.com/watch?v=iFHsEHP437U","sourceName":"Claude","author":"Claude","publishedAt":"2026-10-05T17:06:21Z"}]},{"id":"ff0708f6-5d3b-4276-8dfb-fddb690ec4ac","title":"Make Claude Code prove each timezone bug with a failing test before it edits date code","dek":"Giving the app a fake \"what time is it\" source that tests can set to any date let the same tests run across 40 timezones, trace 312 failures to 19 underlying mistakes, and make Claude Code write a test that fails because of each bug before fixing it.","bodyMd":"Date and time code is a risky place to let an agent \"just fix things,\" because a change to how one function reads a timestamp quietly changes every timestamp that flows through it. A write-up from a time-tracking app's builder lays out a Claude Code workflow that makes each fix prove itself first. The app had been tested in effectively two timezones, and bug reports like \"My Monday report shows 25 hours\" only appeared elsewhere.\n\nThe core idea is a failing test: a test written to fail because of the bug. It proves the bug exists, and when the same test later passes, it shows the fix worked.\n\n**How to set it up**\n\n1. **Audit first, change nothing.** Ask Claude Code to list every direct read of wall-clock time or local timezone. The prompt was roughly: \"Search the codebase for every direct read of wall-clock time or local timezone: Date.now(), new Date() with no args, Intl APIs that default to the runtime zone, getTimezoneOffset(), and any date library call that implicitly uses local time. List each with file, line, and what it's used for. Do not change anything yet.\" It found 61 call sites.\n2. **Make the clock a dependency.** Have the agent add a small `Clock` interface with `now()` and `zone()` (the user's IANA zone), plus a `systemClock` and a `fixedClock(iso, zone)`, and route everything through it. That way the app's source of \"what time is it\" can be swapped for a fake one, so tests can set any date or time they want. This touched 34 files. The existing suite ran green before and after, with the same test count.\n3. **Build a matrix harness.** A test matrix runs the same tests automatically for every combination of timezone and awkward moment. Here that meant 40 zones and nine instants: just before and after spring-forward, both 1:30 AM times on fall-back night, local midnight and one second before, a Sunday 23:59 week boundary, Dec 31 23:59, and Feb 29. The zones include UTC, America/St_Johns, Asia/Kolkata, Asia/Kathmandu (+5:45), Australia/Lord_Howe, Pacific/Kiritimati (+14) and Pacific/Pago_Pago. Instants are described in local terms and resolved to UTC per zone with the IANA tz database. The result was 4,320 cases across 12 behaviors, running in about 14 seconds.\n4. **Write the invariants yourself.** An invariant is a statement that must always be true. Examples: no day has more than 25 hours, the report total equals the sum of the sessions, and a session that starts and ends on one local day appears on exactly one day. The builder wrote these by hand, reasoning that an agent left to invent them would encode the buggy behavior as correct.\n5. **Cluster before fixing.** The first run had 312 failures. The prompt: \"Group them by root cause, not by test name. For each group, write one sentence describing the actual bug, the smallest failing case, and which function you believe is responsible. Don't propose fixes yet.\" A root cause is the underlying mistake behind many failures, and this produced 19 of them, so the work became fixing 19 mistakes rather than 312 failures.\n6. **One root cause at a time.** For each, Claude writes a focused regression test that reproduces only that bug, shows it failing with real output, proposes a diff touching only the identified function, then runs the focused test (must pass) and the full matrix (failures must go down, never up).\n\n**What it caught**\n\nThe \"never up\" rule rejected three fixes. In one, converting day bucketing to the user's zone at read time dropped failures from 312 to 220 but added 14 new failures in streak tests, because streaks were already converting and now did it twice. Other root causes included day bucketing by UTC date, durations computed from local clock fields instead of instant subtraction, and a 15-minute rounding helper that assumed offsets in multiples of 30 minutes, which breaks in Kathmandu.\n\n**Lock it in**\n\nThe builder put the rules in CLAUDE.md so every session reads them: store instants as UTC ISO-8601 with a Z suffix, convert to the user's zone only at the presentation edge, durations are instant subtraction, never call `Date.now()` or `new Date()` directly, and any date-logic change must run the full matrix. Claude also wrote a lint rule that fails CI on direct clock reads, taking the count from 61 to 0.\n\n**When to use it**\n\nReach for this on any code with a wide blast radius where \"make the tests pass\" invites shortcuts such as editing an expected value or special-casing one zone. The builder reports 19 root causes fixed in six working days, about 10 hours of personal time, and no \"wrong day\" or \"wrong hours\" reports in about a month of production. The matrix does not yet cover recurring events across DST changes.","status":"published","storyType":"tip","category":"Workflow","clusterKey":"timezone-bugs-injectable-clock","slug":"make-claude-code-prove-each-timezone-bug-with-a-failing-test-before-it-e-ff0708","url":"https://claudecodereview.ai/a/make-claude-code-prove-each-timezone-bug-with-a-failing-test-before-it-e-ff0708/","relayUrl":"https://relaygrid.com/publications/pivot-claude-code/stories/ff0708f6-5d3b-4276-8dfb-fddb690ec4ac","role":"item","position":5,"imageStatus":"ready","imageUrl":"https://media.pivotnews.ai/brands/claude-code-review/articles/make-claude-code-prove-each-timezone-bug-with-a-failing-test-before-it-e-ff0708/be1bbc98791d1431-1f5537c6fc87bd38/web_hero.webp","imageAlt":"A diagram showing 312 scattered points at the top funneling down into 19 organized vertical channels at the bottom.","createdAt":"2026-10-14T19:59:02.668Z","updatedAt":"2026-10-14T20:00:36.176Z","sources":[{"role":"primary","title":"How One Builder Used Claude Code to Find and Fix 19 Timezone Bugs in a Week","url":"https://dev.to/yureki_lab/how-i-fixed-19-timezone-bugs-in-my-time-tracking-app-with-claude-code-pca","sourceName":"yureki_lab","author":"yureki_lab","publishedAt":"2026-10-13T14:31:30Z"}]}],"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"}]}