{
 "page": "code-mode",
 "asOf": "2026-11-25",
 "question": "Should a heavy Claude Code user turn on Code Mode, what do the measurements actually show, what changes about safety, and does the community codemode bridge still have a job?",
 "registers": [
  "primer",
  "brief",
  "technical"
 ],
 "environment": "Claude Code 2.1.332 native build at ~/.local/share/claude/versions/2.1.332 (383,795,280 bytes), macOS 27.0 build 26A428, read 25 Nov 2026. ejklock/claude-code-mode cloned at 4faec73 (13 Oct 2026). Pi codemode.md as supplied (v1.1.0 era).",
 "sources": {
  "r-docs": {
   "title": "Run tool calls from code with Code Mode",
   "org": "Anthropic, Claude Code docs",
   "url": "https://code.claude.com/docs/en/code-mode",
   "date": "read 2026-11-25",
   "type": "official documentation"
  },
  "r-changelog": {
   "title": "Claude Code changelog, 2.1.323 to 2.1.332",
   "org": "Anthropic",
   "url": "https://code.claude.com/docs/en/changelog",
   "date": "12–25 Nov 2026",
   "type": "official release notes"
  },
  "r-permmodes": {
   "title": "Permission modes: auto mode decision order",
   "org": "Anthropic, Claude Code docs",
   "url": "https://code.claude.com/docs/en/permission-modes",
   "date": "read 2026-11-25",
   "type": "official documentation"
  },
  "r-binary": {
   "title": "Claude Code 2.1.332 binary, strings read locally",
   "org": "this page's author",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "local artifact read"
  },
  "r-locallogs": {
   "title": "4,687 local Claude Code session logs, 11–25 Nov 2026",
   "org": "this page's author",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "local artifact read"
  },
  "r-announce": {
   "title": "Code Mode announcement and its replies",
   "org": "@ClaudeDevs on X",
   "url": "https://x.com/ClaudeDevs/status/2122801681939234950",
   "date": "2026-11-17",
   "type": "official post; replies are opinion"
  },
  "r-osmani": {
   "title": "Code Mode can improve both speed and context efficiency",
   "org": "Addy Osmani on X",
   "url": "https://x.com/addyosmani/status/2124229492248019362",
   "date": "2026-11-21",
   "type": "post"
  },
  "r-anthropic-mcp": {
   "title": "Code execution with MCP: building more efficient agents",
   "org": "Anthropic Engineering",
   "url": "https://www.anthropic.com/engineering/code-execution-with-mcp",
   "date": "2025-11",
   "type": "vendor engineering post"
  },
  "r-cloudflare": {
   "title": "Code Mode: the better way to use MCP",
   "org": "Cloudflare",
   "url": "https://blog.cloudflare.com/code-mode/",
   "date": "2025-09",
   "type": "vendor engineering post"
  },
  "r-bifrost": {
   "title": "Code Mode benchmarks",
   "org": "Bifrost docs",
   "url": "https://bifrost.mintlify.app/mcp/code-mode",
   "date": "undated, read via Dossier 2026-11-25",
   "type": "vendor benchmark"
  },
  "r-pi": {
   "title": "Codemode (pi coding agent docs)",
   "org": "Earendil",
   "url": "https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/codemode.md",
   "date": "read 2026-11-25",
   "type": "official documentation of another harness"
  },
  "r-earendil": {
   "title": "You Said No MCP!",
   "org": "Earendil Engineering",
   "url": "https://earendil.com/posts/you-said-no-mcp/",
   "date": "2026-09-29",
   "type": "vendor post"
  },
  "r-ronacher": {
   "title": "What is Codemode",
   "org": "Armin Ronacher",
   "url": "https://lucumr.pocoo.org/2026/10/6/codemode/",
   "date": "2026-10-06",
   "type": "practitioner essay"
  },
  "r-ejklock": {
   "title": "claude-code-mode: a bridge to Pi's code mode",
   "org": "Evaldo Klock (ejklock) on GitHub",
   "url": "https://github.com/ejklock/claude-code-mode",
   "date": "2026-10-06 to 2026-10-13, v0.7.3",
   "type": "open-source repository with author benchmarks"
  },
  "r-flavio": {
   "title": "How to use Code Mode in Claude Code",
   "org": "Flavio Copes",
   "url": "https://flaviocopes.com/claude-code-code-mode/",
   "date": "2026-11",
   "type": "practitioner test, single runs"
  },
  "r-chase": {
   "title": "This Experimental Feature Is Claude Code's BIGGEST Upgrade of 2026",
   "org": "Chase AI, YouTube",
   "url": "https://www.youtube.com/watch?v=IyuUR51Mu4I",
   "date": "2026-11-19",
   "type": "practitioner video, captions read"
  },
  "r-betterstack": {
   "title": "I Tested Claude Code's New Code Mode 6 Times",
   "org": "Better Stack, YouTube",
   "url": "https://www.youtube.com/watch?v=nraROC2wl8s",
   "date": "2026-11-20",
   "type": "practitioner video, captions read"
  },
  "r-herk": {
   "title": "Claude Code's New Code Mode Clearly Explained (it's cheaper)",
   "org": "Nate Herk, YouTube",
   "url": "https://www.youtube.com/watch?v=80fV5H-Wc_4",
   "date": "2026-11-24",
   "type": "practitioner video, captions read"
  },
  "r-amjad": {
   "title": "Code Mode Makes Claude Code Smarter & Cheaper",
   "org": "Ray Amjad, YouTube",
   "url": "https://www.youtube.com/watch?v=DRNbxPk9Ab8",
   "date": "2026-11-17",
   "type": "practitioner video, captions read"
  },
  "r-seai": {
   "title": "Claude Code's Code Mode: Worth It?",
   "org": "Software Engineer Meets AI, YouTube",
   "url": "https://www.youtube.com/watch?v=Sq9eOmL9U90",
   "date": "2026-11-19",
   "type": "practitioner video, captions read"
  },
  "r-jeredblu": {
   "title": "Claude Code Finally Got MCP Code Mode (Setup + Test)",
   "org": "JeredBlu, YouTube",
   "url": "https://www.youtube.com/watch?v=wSYqwfd5mV0",
   "date": "2026-11-16",
   "type": "practitioner video, captions read"
  },
  "r-pentiminax": {
   "title": "Claude Code : 77 % de tokens en moins avec Code Mode ?",
   "org": "Pentiminax, YouTube",
   "url": "https://www.youtube.com/watch?v=xyPnDpf9EJA",
   "date": "2026-11-23",
   "type": "practitioner video, French captions machine-translated"
  },
  "r-rogoff": {
   "title": "Claude Code Just Dropped Code Mode (Master it in 7 Minutes)",
   "org": "Duncan Rogoff, YouTube",
   "url": "https://www.youtube.com/watch?v=74dC-v_JWCE",
   "date": "2026-11-24",
   "type": "practitioner video, captions read"
  },
  "r-bolyki": {
   "title": "I benchmarked Claude Code's Code Mode: 8 interactive runs, 2 tasks",
   "org": "George (@bolyki) on X",
   "url": "https://x.com/bolyki/status/2123068346224509366",
   "date": "2026-11-18",
   "type": "practitioner benchmark"
  },
  "r-muelas": {
   "title": "Code Mode on and off with the same prompts",
   "org": "Andres (@AndresMuelasT) on X",
   "url": "https://x.com/AndresMuelasT/status/2123436151176306844",
   "date": "2026-11-19",
   "type": "practitioner benchmark"
  },
  "r-tran-time": {
   "title": "Timed runs I could find for Code Mode, on vs off",
   "org": "Nhan Tran (@nhantrandev96) on X",
   "url": "https://x.com/nhantrandev96/status/2124861178828710383",
   "date": "2026-11-23",
   "type": "compilation of practitioner runs"
  },
  "r-tran-37": {
   "title": "Three different 37% numbers attached to Code Mode",
   "org": "Nhan Tran (@nhantrandev96) on X",
   "url": "https://x.com/nhantrandev96/status/2124860976097026399",
   "date": "2026-11-17 and 2026-11-23",
   "type": "compilation of practitioner runs"
  },
  "r-sullivan": {
   "title": "How Code Mode is implemented in Claude Code",
   "org": "Rhys Sullivan (@RhysSullivan) on X",
   "url": "https://x.com/RhysSullivan/status/2121787604215664891",
   "date": "2026-11-15",
   "type": "practitioner observation"
  },
  "r-thariq": {
   "title": "code mode is just a different way of doing tool calling",
   "org": "@trq212 on X",
   "url": "https://x.com/trq212/status/2111499591778734394",
   "date": "2026-10-17",
   "type": "remark by an Anthropic engineer, before launch"
  },
  "r-zechner": {
   "title": "smol models aren't great at codemode at all yet. frontier models love it.",
   "org": "Mario Zechner (@badlogicgames) on X",
   "url": "https://x.com/badlogicgames/status/2111521974455583168",
   "date": "2026-10-17",
   "type": "practitioner remark, Pi author"
  },
  "r-perplexity": {
   "title": "Dossier panel member report (Perplexity Sonar Deep Research)",
   "org": "Dossier run dr_79c2b59543276ae4",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "research backend output"
  },
  "r-gemini": {
   "title": "Architectural Evaluation of Claude Code Native Code Mode (Gemini Deep Research)",
   "org": "Gemini Deep Research, run by hand in the browser after the Dossier lane failed to start",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "research backend output"
  },
  "r-infoq": {
   "title": "Claude Code Adds Experimental Code Mode to Orchestrate Tools",
   "org": "Daniel Dominguez, InfoQ",
   "url": "https://www.infoq.com/news/2026/11/claude-code-mode/",
   "date": "2026-11-23",
   "type": "engineering journalism"
  },
  "r-npm-pi": {
   "title": "@earendil-works/pi-codemode on npm",
   "org": "npm registry",
   "url": "https://www.npmjs.com/package/@earendil-works/pi-codemode",
   "date": "read 2026-11-25 (latest 1.6.0, modified 2026-11-20)",
   "type": "package registry"
  },
  "r-claude-lane": {
   "title": "Dossier panel member report (Claude, run in-session through the local research loop)",
   "org": "Dossier run dr_0ebb0a242046ba6f",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "research backend output"
  },
  "r-arxiv-rai": {
   "title": "Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster?",
   "org": "Abhishek Rai, arXiv 2611.19123 (preprint)",
   "url": "https://arxiv.org/abs/2611.19123",
   "date": "2026-11-14",
   "type": "preprint"
  },
  "r-arxiv-ptc": {
   "title": "The Bitter Lesson of Tool Calling",
   "org": "Ishan Patel, Sahil Sen, Elias Lumer et al., arXiv 2608.06370 (preprint)",
   "url": "https://arxiv.org/abs/2608.06370",
   "date": "2026-08-06",
   "type": "preprint"
  },
  "r-gh-111575": {
   "title": "Code Mode: hooks can't see inner tool calls, and file().text() skips Read events (#111575)",
   "org": "anthropics/claude-code issue tracker",
   "url": "https://github.com/anthropics/claude-code/issues/111575",
   "date": "2026-11-21",
   "type": "user bug report"
  },
  "r-gh-112065": {
   "title": "PostToolUse updatedToolOutput keeps only ~30,000 characters and drops the spill path (#112065)",
   "org": "anthropics/claude-code issue tracker",
   "url": "https://github.com/anthropics/claude-code/issues/112065",
   "date": "2026-11-24",
   "type": "user bug report"
  },
  "r-gh-111618": {
   "title": "Code Mode: steps chained after a background shell command never run (#111618)",
   "org": "anthropics/claude-code issue tracker",
   "url": "https://github.com/anthropics/claude-code/issues/111618",
   "date": "2026-11-22",
   "type": "user bug report"
  },
  "r-gh-112152": {
   "title": "Code Mode: Claude waits for long CI runs with sleep() and poll loops in REPL scripts (#112152)",
   "org": "anthropics/claude-code issue tracker",
   "url": "https://github.com/anthropics/claude-code/issues/112152",
   "date": "2026-11-25",
   "type": "user bug report"
  },
  "r-bicameral": {
   "title": "Claude Code \"Code Mode\" Benchmark (96 runs, six tasks, four models)",
   "org": "Bicameral-AI, GitHub",
   "url": "https://github.com/Bicameral-AI/claude-code-mode-benchmark",
   "date": "2026-11-17",
   "type": "independent benchmark"
  },
  "r-majumder": {
   "title": "How Claude Code's Code Mode works",
   "org": "Arindam Majumder",
   "url": "https://arindamm.dev/blog/how-claude-codes-code-mode-works-4107",
   "date": "2026-11-21",
   "type": "practitioner write-up with a paired run"
  },
  "r-gh-111259": {
   "title": "Code Mode: hooks modules never get classic.PostToolUse for REPL output (#111259)",
   "org": "anthropics/claude-code issue tracker",
   "url": "https://github.com/anthropics/claude-code/issues/111259",
   "date": "2026-11-20",
   "type": "user bug report"
  },
  "r-openai-lane": {
   "title": "Dossier panel member report (OpenAI gpt-6.1-sol, Responses API)",
   "org": "Dossier run dr_64065e4168fefefb",
   "url": "#methods",
   "date": "2026-11-25",
   "type": "research backend output"
  }
 },
 "claims": [
  {
   "id": "c-what",
   "kind": "direct",
   "confidence": "high",
   "text": "Code Mode has Claude write a piece of JavaScript that makes several tool calls and returns only what Claude needs to read; it is experimental, off by default, and arrived in Claude Code 2.1.323 on 12 November 2026.",
   "sources": [
    "r-docs",
    "r-changelog",
    "r-announce"
   ],
   "passage": "With Code Mode, Claude writes a piece of JavaScript that makes the tool calls, and Claude Code runs that code in your session. … Code Mode is experimental and off by default.",
   "limits": "Behaviour described is as of 2.1.332.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-borrowed",
   "kind": "direct",
   "confidence": "high",
   "text": "The widely shared 98.7% and 99% token figures measure other systems loading MCP tool definitions (Anthropic's 2025 code-execution post, Cloudflare's Code Mode, Bifrost), and Anthropic's Code Mode docs give no savings number at all.",
   "sources": [
    "r-anthropic-mcp",
    "r-cloudflare",
    "r-bifrost",
    "r-docs",
    "r-rogoff",
    "r-tran-37"
   ],
   "passage": "Anthropic's code-execution post: 150,000 to 2,000 tokens in a scenario. Rogoff: 'None of those are Claude Code's code mode. Anthropic's code mode guide doesn't give a saving number at all.'",
   "limits": "The vendor figures are real measurements of different systems; they are not wrong, they are misattributed.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-studies",
   "kind": "direct",
   "confidence": "medium",
   "text": "Controlled studies of the pattern on other harnesses find large token savings and equal or better accuracy, but none measures Claude Code: a pre-registered study cut tokens 70 to 90 percent with instant synthetic tools and three open-weight models, and a 14-model comparison found code calls matching or beating JSON calls in 11 of 14.",
   "sources": [
    "r-arxiv-rai",
    "r-arxiv-ptc",
    "r-claude-lane"
   ],
   "passage": "Rai: 'Code mode substantially outperforms plain MCP, cutting token usage by 70 to 90 percent' and 'The study does not test unseen task families, real third-party MCP servers, real per-call latency'. Patel et al.: 'Programmatic tool calling matches or exceeds native JSON tool calling in 11 of 14 models on BFCL v4'.",
   "limits": "Both are preprints, not peer reviewed; neither reports dollar cost under prompt-cache pricing; found by the Claude lane through the arXiv API.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-framing",
   "kind": "direct",
   "confidence": "high",
   "text": "The launch pitch is that Code Mode 'can improve both speed and context efficiency when Claude needs to orchestrate multiple steps'.",
   "sources": [
    "r-osmani"
   ],
   "passage": "Code Mode is an experimental new feature in Claude Code that can improve both speed and context efficiency when Claude needs to orchestrate multiple steps.",
   "limits": "A claim of possibility ('can'), not a measured figure.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-thariq",
   "kind": "direct",
   "confidence": "high",
   "text": "An Anthropic engineer wrote in October that code mode is 'just a different way of doing tool calling? not a lot more token efficient from what I've seen'.",
   "sources": [
    "r-thariq"
   ],
   "passage": "eh but code mode is just a different way of doing tool calling? not a lot more token efficient from what I've seen",
   "limits": "A remark, not a measurement, made a month before Claude Code shipped its own version.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-tokens",
   "kind": "direct",
   "confidence": "medium",
   "text": "On jobs with many tool calls, independent on/off tests of Claude Code's Code Mode found 35% to 77% fewer tokens processed.",
   "sources": [
    "r-bolyki",
    "r-infoq",
    "r-tran-37",
    "r-chase",
    "r-pentiminax",
    "r-herk",
    "r-seai",
    "r-bicameral"
   ],
   "passage": "bolyki, eight Sonnet 5.5 runs (InfoQ), 465,875 to 291,471 (37%); Chase AI 2.3M to 660,000 read (71%); Pentiminax 740,000 to 176,530 (76%); Herk 35% fewer input; SE Meets AI 40% less input.",
   "limits": "Mostly one to three runs per side; Bicameral's is two runs per cell across four models; counts include cache reads.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-cost",
   "kind": "direct",
   "confidence": "medium",
   "text": "Where testers reported both, the bill fell by less than the token count, or rose, in eight of nine paired tests: 37% fewer tokens became 19% lower cost, 35% became about 17%, and on Bicameral's file and control tasks fewer tokens cost more. The exception is many MCP calls whose results stay inside the script, where 77% fewer tokens became 76% lower cost.",
   "sources": [
    "r-bolyki",
    "r-infoq",
    "r-tran-37",
    "r-herk",
    "r-amjad",
    "r-bicameral"
   ],
   "passage": "Bicameral, Opus 5.5, two runs summed: M1 1.51M to 0.35M tokens, $1.74 to $0.41; T1 657k to 473k tokens, $0.65 to $0.72; C0 176k to 124k tokens, $0.33 to $0.42.",
   "limits": "Nine paired measurements from five sources; cost is each tester's own estimate or Claude Code's recorded figure, never checked against a price list.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-bicameral",
   "kind": "direct",
   "confidence": "medium",
   "text": "The largest native benchmark, 96 runs of six tasks on four models on 2.1.326, found the bill kept pace with the count only on MCP work: on the three models with comparable costs, the MCP tasks cost 60% to 76% less as tokens fell 49% to 77%, while on file work and a one-question control tokens fell in all nine pairs and recorded cost rose in six.",
   "sources": [
    "r-bicameral",
    "r-openai-lane"
   ],
   "passage": "Bicameral: 'On M1, Code Mode cost 23% to 28% as much and took 20% to 41% of the time, on the three models whose recorded costs are large enough to compare.' Recorded cost, two runs summed: Opus M1 $1.74 to $0.41, Sonnet M1 $0.83 to $0.20, Fable C0 $0.61 to $0.83.",
   "limits": "Two runs per cell, medium effort, macOS, an MCP server with two tools and no subagents; costs are Claude Code's own recorded figures, never checked against a price list, and Haiku's are too small to compare. Found by the OpenAI lane and re-read at the source.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-filter",
   "kind": "direct",
   "confidence": "medium",
   "text": "A script that decides what the model reads can drop records: in one Bicameral run a keyword filter left four of nine tickets out of the answer, and on 2.1.325 another hid two of nine while the answer said every ticket had been read.",
   "sources": [
    "r-bicameral"
   ],
   "passage": "Bicameral: 'in one run a keyword filter left four of nine tickets out of the answer, and on Claude Code 2.1.325 another hid two of nine while the answer said every ticket had been read.'",
   "limits": "Generated test tickets with repeated patterns; the failures were all on Haiku 5.5.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-mcp-load",
   "kind": "direct",
   "confidence": "high",
   "text": "Code Mode doesn't lighten the load on an MCP server: in every Bicameral run of the three MCP tasks the server received the same 3 list calls and 120 fetches with Code Mode off and on.",
   "sources": [
    "r-bicameral",
    "r-openai-lane"
   ],
   "passage": "Bicameral: 'In all three MCP tasks, in every run, the server received the same calls in both modes: 3 to list the tickets and 120 to fetch them. Code Mode did the same work, not less.'",
   "limits": "One synthetic server; rate limits and router-side throttling were not tested.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-cost-flat",
   "kind": "direct",
   "confidence": "medium",
   "text": "Better Stack's six runs found Code Mode about 80% faster with 28% fewer round trips, and the cost 'came out to be the same'; another tester found it 13–39% cheaper in four of five tasks.",
   "sources": [
    "r-betterstack",
    "r-muelas"
   ],
   "passage": "Better Stack: 'the cost came out to be the same. So I wouldn't say this saves you any money, but it does save you time.'",
   "limits": "Three runs per side for Better Stack; Muelas's write-up sits behind a link not read here.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-cachewrite",
   "kind": "direct",
   "confidence": "medium",
   "text": "One paired run shows the cache write directly: tokens read nearly halved, 264k to 140k, but the first Code Mode request wrote 33k tokens to a cold cache, and Claude Code put the two runs at $0.34 and $0.35.",
   "sources": [
    "r-majumder"
   ],
   "passage": "Majumder: 'Tokens read across all requests nearly halved (264k to 140k), but most of those were cheap cache reads. Claude Code's own estimate put the runs at $0.34 vs $0.35, because the first Code Mode request wrote 33k tokens to a cold cache.'",
   "limits": "One short run on 2.1.330; the author expects a longer session to outweigh the one-time write but did not measure one.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-why-cheap",
   "kind": "inference",
   "confidence": "medium",
   "from": [
    "c-tokens",
    "c-cost",
    "c-small"
   ],
   "text": "The gap between tokens and dollars has three likely causes: the tokens Code Mode removes are mostly cheap cache rereads, the script is written in output tokens, which cost more, and a Code Mode session's first request writes its new prompt to a cold cache.",
   "sources": [
    "r-herk",
    "r-ejklock",
    "r-seai",
    "r-gemini",
    "r-majumder"
   ],
   "passage": "Majumder: 'Tokens read across all requests nearly halved (264k to 140k), but most of those were cheap cache reads. Claude Code's own estimate put the runs at $0.34 vs $0.35, because the first Code Mode request wrote 33k tokens to a cold cache.'",
   "limits": "One tester measured the cold-cache write; nobody published a full per-token-class breakdown.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-time",
   "kind": "direct",
   "confidence": "medium",
   "text": "Speed splits by kind of work: in Bicameral's 24 model-task pairs every MCP task ran faster and every file and control task ran slower, and across 12 other timed comparisons from 7 testers Code Mode was faster in 5, slower in 6 and level in 1, from 2.3 times faster to 6.7 times slower.",
   "sources": [
    "r-flavio",
    "r-tran-time",
    "r-chase",
    "r-jeredblu",
    "r-herk",
    "r-bicameral"
   ],
   "passage": "Bicameral, Opus 5.5, two runs summed: M1 142 s to 35 s; T1 84 s to 179 s. Flavio link check 35s off, 15s on; Herk 'broken links job took three minutes instead of just 27 seconds'.",
   "limits": "Bicameral's file and control pairs were sometimes only 2% slower; most other comparisons are single runs.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-small",
   "kind": "direct",
   "confidence": "medium",
   "text": "Small jobs are where it loses: one tester measured a run more than five times longer with 1.5 times the output tokens, and Claude Code's own docs point it at changes across many files, filtered searches and parallel commands.",
   "sources": [
    "r-seai",
    "r-docs",
    "r-bolyki"
   ],
   "passage": "SE Meets AI: 'With codemode, it took more than 5x longer than without … output tokens … up to 1.5 x'.",
   "limits": "One tester for the 5x figure.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-bgbugs",
   "kind": "direct",
   "confidence": "low",
   "text": "Two open bug reports describe slow runs from the background-run path: steps chained after a backgrounded command never run, so Claude reruns the command and total time doubles, and Claude waits out 20-minute CI runs with sleep loops inside scripts, ten minutes at a time.",
   "sources": [
    "r-gh-111618",
    "r-gh-112152",
    "r-claude-lane"
   ],
   "passage": "#111618: 'it reruns the whole command in the foreground. Total time doubles.' #112152: 'Each script holds the session for up to 10 minutes, then Claude starts another one.'",
   "limits": "User reports with repro steps on 2.1.327 to 2.1.331; no Anthropic reply yet, so unconfirmed.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-startup",
   "kind": "direct",
   "confidence": "low",
   "text": "How big a Code Mode session starts depends on the setup: one tester's started at 29.7k tokens against 19.6k without, while Bicameral's, with a two-tool MCP server, started about 13,000 tokens smaller on every model because Claude Code sends far fewer built-in tool definitions.",
   "sources": [
    "r-jeredblu",
    "r-bicameral"
   ],
   "passage": "Bicameral: 'built-in tool definitions take 16.3k tokens with Code Mode off and 3.6k with it on.'",
   "limits": "Different versions and setups; 2.1.328 shortened Code Mode's instructions after JeredBlu's test.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   },
   "omit": [
    "primer"
   ],
   "omitReason": "primer: a detail about one session's starting size; the gap between count and bill already carries the point for a first-time reader"
  },
  {
   "id": "c-model",
   "kind": "direct",
   "confidence": "low",
   "text": "The model comparison Pentiminax quoted is Bicameral's file-work row: 37% fewer tokens on Opus, 54% on Sonnet and 9% more on Haiku. Bicameral puts Haiku's rise down to one run whose script looked in the wrong folder and failed 344 of 349 shell commands.",
   "sources": [
    "r-bicameral",
    "r-pentiminax",
    "r-zechner"
   ],
   "passage": "Bicameral: 'In that run its script looked for files from the wrong folder, and 344 of its 349 shell commands failed.'",
   "limits": "Two runs per cell; Zechner's view that small models aren't good at code mode yet fits the failure but isn't proven by it.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": "frontier models love it.\""
   },
   "omit": [
    "primer"
   ],
   "omitReason": "primer: the one model comparison turned out to rest on a single broken run; it would mislead a first-time reader more than it informs"
  },
  {
   "id": "c-scripting",
   "kind": "direct",
   "confidence": "medium",
   "text": "Without Code Mode, Opus already scripted a 53-file change itself in all three Better Stack runs, through a Python script Claude Code could not see; with Code Mode the same edits went through Claude Code's own Edit tool and showed as 224 lines added and 171 removed.",
   "sources": [
    "r-betterstack"
   ],
   "passage": "after the runs without code mode, the cost command reported zero lines added and zero lines removed for a change across 53 files … with code mode, it reported 224 lines added and 171 removed",
   "limits": "One tester, one task.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-background",
   "kind": "direct",
   "confidence": "high",
   "text": "Code can keep running in the background for up to two hours while you talk to Claude, but only in auto or bypassPermissions mode; otherwise Claude waits and the code stops at ten minutes.",
   "sources": [
    "r-docs",
    "r-flavio",
    "r-announce"
   ],
   "passage": "Waiting: … the code stops after ten minutes. Background: you can keep talking to Claude, and the code can run for up to two hours.",
   "limits": "Flavio ran 100 builds in the background in 2m 23s while asking another question.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-persist",
   "kind": "direct",
   "confidence": "high",
   "text": "Variables a script sets carry into the next script in the same session: 2.1.329 fixed a script's `let x;` keeping an earlier script's value, 2.1.332 tells Claude on resume that earlier script variables are gone, and Better Stack kept a 44 MB log in memory across steps.",
   "sources": [
    "r-changelog",
    "r-betterstack"
   ],
   "passage": "2.1.332: 'Claude is now told up front that its earlier script variables are gone'. Better Stack: 'Claude loaded the file into a variable once. And because variables stay in memory between steps'.",
   "limits": "Lost on resume.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-classifier",
   "kind": "direct",
   "confidence": "high",
   "text": "In auto mode the classifier reviews each piece of code once before it runs, not each tool call, and does not see values computed at run time; deny and ask rules and PreToolUse hooks still see every call under the tool's usual name.",
   "sources": [
    "r-docs",
    "r-permmodes",
    "r-betterstack"
   ],
   "passage": "the classifier reviews each piece of code before it runs, not each tool call. It doesn't see values computed at run time, such as a path taken from search output",
   "limits": "Bash rules match command text, so they miss reworded commands with or without Code Mode.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-outside",
   "kind": "direct",
   "confidence": "high",
   "text": "The JavaScript itself, and its file, web and MCP calls, run outside Claude Code's sandbox; only the shell commands it starts are sandboxed.",
   "sources": [
    "r-docs",
    "r-sullivan"
   ],
   "passage": "The JavaScript itself and its file, web, and MCP tool calls run outside the sandbox. To isolate the JavaScript and those calls too, run Claude Code in a container or virtual machine.",
   "limits": "Sullivan reports node:vm in-process under Bun; the 2.1.332 binary bundles node:vm, but the exact call path was not traced here.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-hooks",
   "kind": "direct",
   "confidence": "high",
   "text": "Since 2.1.329, a PreToolUse hook that errors no longer refuses a script's tool call; a hook that must refuse needs \"onFailure\": \"block\", and since 2.1.328 UserPromptSubmit hooks no longer see code output.",
   "sources": [
    "r-changelog",
    "r-docs"
   ],
   "passage": "Changed Code Mode so a PreToolUse hook that errors no longer refuses a script's tool call, as outside Code Mode; set \"onFailure\": \"block\"",
   "limits": "Applies to command and http hooks.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   },
   "omit": [
    "primer"
   ],
   "omitReason": "primer: hook settings are configuration detail for someone already running hooks; the Brief and Technical readings carry it"
  },
  {
   "id": "c-hookgaps",
   "kind": "direct",
   "confidence": "low",
   "text": "Three hook gaps are reported and unanswered: file() reads in a script fire no Read event, which made read-before-edit hooks the top cause of failed scripts in about 900 REPL calls; a PostToolUse redaction hook keeps only about 30,000 characters, silently cutting the data a script parses; and a mod's hooks module never gets PostToolUse for REPL output.",
   "sources": [
    "r-gh-111575",
    "r-gh-112065",
    "r-gh-111259",
    "r-claude-lane"
   ],
   "passage": "#111575: 'This was the top cause of failed scripts in about 900 REPL calls.' #111259: 'A hooks module's on('classic.PostToolUse', ...) never fires for REPL'.",
   "limits": "User reports; the tools reference documents no file() helper, so the docs neither confirm nor deny the first.",
   "omit": [
    "primer"
   ],
   "omitReason": "primer: hook behaviour is configuration detail for someone already running hooks; the Brief and Technical readings carry it",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-reviewquote",
   "kind": "direct",
   "confidence": "high",
   "text": "Replies to the announcement put the concern plainly: approval moving to the whole script turns the permission prompt into a code review, and a check that lives inside the script Claude wrote is one Claude can loosen.",
   "sources": [
    "r-announce"
   ],
   "passage": "@jeffbruchado: 'the permission prompt basically turns into a code review'. @world_0618: 'If the check lives in the script Claude just wrote, what's stopping it from loosening that check to get a pass?'",
   "limits": "Opinions in replies, not measurements.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-auth",
   "kind": "direct",
   "confidence": "high",
   "text": "It doesn't move the auth layer: an engineer who builds agent auth infrastructure told InfoQ Code Mode 'doesn't materially change anything wrt authentication, authorization and audit policy layers'; the same MCP calls go out with the same tokens.",
   "sources": [
    "r-infoq"
   ],
   "passage": "Ravi Madabhushi, quoted by InfoQ, 23 Nov 2026.",
   "limits": "One practitioner's view.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-proxy",
   "kind": "direct",
   "confidence": "high",
   "text": "Code Mode refuses to start through a gateway or proxy: the docs say so, and the 2.1.332 binary carries the refusal 'it isn't offered yet through a gateway or proxy, or with Claude for Government'.",
   "sources": [
    "r-docs",
    "r-binary"
   ],
   "passage": "case\"provider\":return\"it isn't offered yet through a gateway or proxy, or with Claude for Government\"",
   "limits": "HTTPS_PROXY is allowed; it is a custom ANTHROPIC_BASE_URL or gateway that disqualifies.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-headless",
   "kind": "direct",
   "confidence": "high",
   "text": "Headless runs get it too, but only direct to Anthropic: the 2.1.332 binary says 'claude -p and Agent SDK apps get it only on the Anthropic API, not through a cloud provider or a gateway', and two 2.1.332 fixes touch -p and the SDK, while the docs page still describes an interactive terminal feature.",
   "sources": [
    "r-binary",
    "r-changelog",
    "r-docs"
   ],
   "passage": "case\"headless_provider\":return\"for now claude -p and Agent SDK apps get it only on the Anthropic API, not through a cloud provider or a gateway\"",
   "limits": "Flavio Copes's post (2.1.325–2.1.327) and the Gemini report say -p is excluded; that describes earlier builds or the docs, not the 2.1.332 binary.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-local",
   "kind": "direct",
   "confidence": "high",
   "text": "On this page's author's machine the flag was on and Code Mode never ran: 0 REPL calls across 4,687 session logs in the 14 days since launch.",
   "sources": [
    "r-locallogs"
   ],
   "passage": "grep for \"name\":\"REPL\" across 4,687 .jsonl transcripts modified in 14 days: 0 files; the same pattern finds 46 Bash calls in one session.",
   "limits": "One machine.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-local-why",
   "kind": "inference",
   "confidence": "medium",
   "from": [
    "c-proxy",
    "c-local"
   ],
   "text": "The likely cause is that machine's local proxy: ANTHROPIC_BASE_URL points at 127.0.0.1, which is the case the binary refuses.",
   "sources": [
    "r-binary",
    "r-locallogs"
   ],
   "passage": "CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in the shell; ANTHROPIC_BASE_URL=http://127.0.0.1:8858; refusal reason 'provider'.",
   "limits": "Reasoned from configuration and strings; /status, which prints the actual reason, was not read.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-perplexity",
   "kind": "direct",
   "confidence": "high",
   "text": "Four research backends returned and split on the main call. Perplexity recommended turning Code Mode on by default behind a local proxy and called the runtime sandboxed; Gemini and OpenAI recommended against turning it on across a proxied setup, and OpenAI proposed a version-pinned trial instead; the Claude lane, run by the session that wrote this page, expected the smaller, cost-discounted saving everywhere. The docs and the binary side with Gemini and OpenAI on the proxy, and Bicameral's benchmark corrects the Claude lane on MCP-heavy work.",
   "sources": [
    "r-perplexity",
    "r-gemini",
    "r-openai-lane",
    "r-claude-lane",
    "r-docs",
    "r-binary",
    "r-bicameral"
   ],
   "passage": "OpenAI: 'Do not enable native Code Mode across your workflow as currently configured.' Perplexity: 'you should enable Claude Code's native Code Mode by default for such workflows'.",
   "limits": "Perplexity's 19, OpenAI's 40 and the Claude lane's 17 citations all resolve; Gemini's report also says -p and the Agent SDK are excluded, which the 2.1.332 binary contradicts. The Claude lane is not independent of this page.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-lineage",
   "kind": "direct",
   "confidence": "medium",
   "text": "The pattern predates Claude Code's version: Cloudflare named it in September 2025, Anthropic described it for MCP in November 2025, Pi shipped codemode in September 2026, and the runtimes differ: Claude Code uses node:vm in process, Codex V8, OpenCode a custom interpreter, Pi QuickJS.",
   "sources": [
    "r-cloudflare",
    "r-anthropic-mcp",
    "r-pi",
    "r-earendil",
    "r-sullivan"
   ],
   "passage": "Sullivan: 'they use node:vm running in process in Bun. Codex does their code mode in v8, OpenCode does theirs in a custom interpreter, Pi uses quickjs'.",
   "limits": "The runtime list is one practitioner's reading.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-nested",
   "kind": "direct",
   "confidence": "medium",
   "text": "Ronacher calls code mode inside code mode 'pretty bad': a script that calls an MCP server which itself takes code, as Cloudflare's does, doubles the escaping, and the inner code can't call the outer tools.",
   "sources": [
    "r-ronacher",
    "r-gemini"
   ],
   "passage": "'But now we have Codemode in Codemode which is pretty bad. It means double JSON escaping, easy for smaller models to get confused by and the inner code cannot call the outer tools.'",
   "limits": "Written about Pi; the mechanism is the same for any harness.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-pi",
   "kind": "direct",
   "confidence": "high",
   "text": "Pi's codemode documents things Claude Code's docs do not: a QuickJS sandbox with no file system, network or timers, store() and load() that persist into the session, tool search inside the script, and non-LLM classifier and image models.",
   "sources": [
    "r-pi",
    "r-ronacher",
    "r-docs"
   ],
   "passage": "It runs as the body of an async function in a QuickJS sandbox … The sandbox has no Node APIs, file system, network, or timers",
   "limits": "Absence from Claude Code's docs is not proof the feature is absent from the binary; it is not documented now.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-spawn",
   "kind": "direct",
   "confidence": "medium",
   "text": "The 2.1.332 binary contains an undocumented spawnContext function that starts an agent from a script, matching Ray Amjad's report of unreleased context tools.",
   "sources": [
    "r-binary",
    "r-amjad"
   ],
   "passage": "throw new Jre(`spawnContext '${n}' refused \\u2014 ${y??\"the Agent tool returned no agent id\"}`)",
   "limits": "Present in the binary; not documented and not known to be callable.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   },
   "omit": [
    "primer"
   ],
   "omitReason": "primer: an unreleased, undocumented function in the program; too internal for a first read"
  },
  {
   "id": "c-ejklock",
   "kind": "direct",
   "confidence": "high",
   "text": "ejklock/claude-code-mode bridged Pi's runtime into Claude Code through a mod a month before Anthropic shipped; its author measured 2 turns against 7 and $0.023 against $0.039 on a five-file task, with a bridge that costs about 98 ms to open.",
   "sources": [
    "r-ejklock"
   ],
   "passage": "read 5 tracked files, report their TODOs | 2 / 7 | … | $0.023 / $0.039 … the bridge costs ~98 ms to open",
   "limits": "Three runs per side on Claude Code 2.1.292; no commits since 13 October; three GitHub stars.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-ejklock-role",
   "kind": "inference",
   "confidence": "low",
   "from": [
    "c-ejklock",
    "c-proxy",
    "c-pi"
   ],
   "text": "The bridge's remaining job is where native Code Mode will not go: it runs as a mod rather than through the provider check, so it may work behind a proxy, and it keeps Pi's script API and per-server MCP exposure modes.",
   "sources": [
    "r-ejklock",
    "r-binary",
    "r-npm-pi"
   ],
   "passage": "It is a bridge: it runs Pi's own script runtime … and connects each tools.* call the script makes to Claude Code's own tool call.",
   "limits": "Untested here; the plugin pins pi-codemode 1.1.0 where npm's latest is 1.6.0 (20 Nov 2026), it was last tested on Claude Code 2.1.291 and 2.1.292, and the mods API is early access.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-churn",
   "kind": "direct",
   "confidence": "high",
   "text": "Nine releases in thirteen days changed Code Mode: 79 changelog entries between 2.1.323 and 2.1.332, 49 of them fixes.",
   "sources": [
    "r-changelog"
   ],
   "passage": "Entries mentioning Code Mode per release: 323:1, 325:3, 326:7, 327:3, 328:22, 329:17, 330:9, 331:6, 332:11.",
   "limits": "Counted by matching 'Code Mode' in each entry. The changelog has no 2.1.324 entry; the Gemini report counts ten releases by version number.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "c-reception",
   "kind": "direct",
   "confidence": "high",
   "text": "The announcement drew 12.7k likes and 2.56M views; the most-liked replies mocked the name, said Pi, Cloudflare or DeepSeek did it first, asked for the Agent SDK and Desktop, and called losing Remote Control a dealbreaker.",
   "sources": [
    "r-announce"
   ],
   "passage": "'Why are frontier labs so uniquely bad at naming things' (153 likes); 'No, thank you.' (358); 'The incompatibility with /RC is a dealbreaker.'",
   "limits": "Counts read on 25 Nov 2026.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": "Top replies by likes: \"No, thank you.\" (358), \"Why are frontier labs so uniquely bad at naming things\" (153), prior-art claims for Pi, Cloudflare and DeepSeek's PTC mode, requests for the Agent SDK and Desktop, and \"The incompatibility with /RC is a dealbreaker.\""
   }
  },
  {
   "id": "v-long-on",
   "kind": "inference",
   "confidence": "medium",
   "category": "long-jobs",
   "rank": 1,
   "from": [
    "c-tokens",
    "c-cost",
    "c-time",
    "c-scripting",
    "c-background",
    "c-nested"
   ],
   "text": "For long jobs with many tool calls, and above all MCP chains that need back a total or a short list rather than every record, turn Code Mode on in auto mode with ask rules on the commands you must see.",
   "sources": [
    "r-bicameral",
    "r-betterstack",
    "r-chase",
    "r-bolyki"
   ],
   "limits": "On file work the bill falls less than the count or rises, and runs were slower in every Bicameral file pair. If an MCP router already wraps its servers in a code tool, give the session the plain tools instead.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "v-long-off",
   "kind": "inference",
   "confidence": "medium",
   "category": "long-jobs",
   "rank": 2,
   "from": [
    "c-scripting",
    "c-cost-flat"
   ],
   "text": "Leaving it off and letting Claude script the job in the shell gets much of the batching, without the experimental flag.",
   "sources": [
    "r-betterstack"
   ],
   "limits": "Edits made by a shell script are invisible to Claude Code's diffs and file history.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "v-small-off",
   "kind": "inference",
   "confidence": "medium",
   "category": "small-jobs",
   "rank": 1,
   "from": [
    "c-small",
    "c-time",
    "c-cost",
    "c-startup"
   ],
   "text": "For quick questions and one-file edits, leave it off.",
   "sources": [
    "r-seai",
    "r-bolyki",
    "r-bicameral"
   ],
   "limits": "Wrong if a session mixes both kinds of work, since Code Mode is per session.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "v-proxy-direct",
   "kind": "inference",
   "confidence": "medium",
   "category": "behind-a-proxy",
   "rank": 1,
   "from": [
    "c-proxy",
    "c-local",
    "c-local-why"
   ],
   "text": "Behind a gateway or local proxy, native Code Mode will not start; trial it in a separate session that connects to Anthropic directly, and run /status first.",
   "sources": [
    "r-docs",
    "r-binary"
   ],
   "limits": "Loses whatever the proxy adds: routing, logging, model switching.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "v-proxy-bridge",
   "kind": "inference",
   "confidence": "low",
   "category": "behind-a-proxy",
   "rank": 2,
   "from": [
    "c-ejklock-role"
   ],
   "text": "If the proxy has to stay, the community bridge is the only code mode available, at the cost of running an unmaintained plugin on an early-access API.",
   "sources": [
    "r-ejklock"
   ],
   "limits": "Untested on 2.1.33x.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  },
  {
   "id": "v-unattended",
   "kind": "inference",
   "confidence": "medium",
   "category": "unattended",
   "rank": 1,
   "from": [
    "c-classifier",
    "c-outside",
    "c-hooks",
    "c-reviewquote"
   ],
   "text": "For unattended runs with destructive reach, keep the checks outside the script: ask rules on the commands that matter, PreToolUse hooks with onFailure set to block, and a container if file and MCP calls must be isolated.",
   "sources": [
    "r-docs",
    "r-changelog"
   ],
   "limits": "An ask rule on REPL itself stops background code from running unattended.",
   "readings": {
    "primer": "",
    "brief": "",
    "technical": ""
   }
  }
 ]
}
