OctoDock is about 47k lines of TypeScript across maybe 200 files. Last weekend I asked Claude Opus 4.6 to do something I'd been putting off: rename a core abstraction (Adapter to AppAdapter) everywhere it appeared, including all the places where it leaked into log messages, error strings, type names, and test fixtures.
I didn't run a script. I dumped the entire repo into one Claude conversation — about 800k tokens of source — and asked it to do the rename, surface anything ambiguous, and explain its reasoning for the edge cases.
It mostly worked. Here's where it shone and where it tripped.
Three things to walk away with
- The 1M context window on Claude Opus 4.6 / Sonnet 4.6 is generally available now, no beta header needed — the older Sonnet 4.5 1M beta retires April 30, 2026 (source)
- For "see the whole codebase before deciding" tasks, 1M wins. For "surgical edit one file," it's overkill and slower than you'd think
- Where it choked was on multi-file consistency — not the renames themselves, but in keeping documentation, types, and tests aligned across the 200 files
The setup
I used claude CLI (Claude Code) with the --model claude-opus-4-6 flag. Pasted in the entire repo via the Read tool in a single session. Total tokens used in the initial context: roughly 820k. That left me about 180k of headroom for the conversation itself.
The official 1M context window for Opus 4.6 and Sonnet 4.6 is generally available at standard pricing per Anthropic's API release notes. No beta header. No special endpoint. Same SDK call as 200k requests, just bigger.
What it nailed
The straight rename was perfect across all 200 files. Not a single missed reference, including:
- Comments that mentioned
Adapterin passing - String literals in error messages (
throw new Error('Adapter not connected')) - Test fixture filenames (
adapter-test.json→app-adapter-test.json) - Variable names that contained the word
adapterbut weren't the type itself (it correctly leftdataAdapterPatternalone because that was a different concept)
That last one was the surprise. With 800k context, it could see thatdataAdapterPatternwas defined and used in a totally separate module with its own meaning, so it didn't "helpfully" rename it. A regex-based rename would have caught it. A 200k-context Claude run would probably have caught it too if I'd guided it. But the 1M run figured it out without a hint.
Where it choked
Documentation lag. The README, the architecture doc, and three CLAUDE.md files used Adapter extensively. The model renamed them, but didn't catch that the README's example code block referenced a type that no longer existed because the example was inline markdown, not real code. Tests caught it (because the docs include doctest-like snippets), but I had to point that out.
It also got slower as context filled up. The first three turns felt instant. By turn 8, when most of my conversation was visible in context, response start time was noticeably longer — maybe 4 to 6 seconds for thinking before tokens started streaming.
What I learned about when to use 1M
🔬 Use it when:
- The task requires reading multiple files to make a single decision
- You're doing a refactor that touches strings, comments, and code
- You don't know in advance which files matter
🔬 Don't use it when: - The task is editing one file you can identify in advance
- You're doing rapid back-and-forth (latency adds up)
- Cost matters and you can scope down with a few
greps instead
Anthropic also raised the media limit from 100 to 600 images / PDF pages per request when using the 1M token context window (source). I haven't tried this yet, but "throw 600 PDF pages and a codebase at one prompt" is a real scenario for due diligence work, and it didn't exist a year ago.
The honest comparison
Could I have done this with sed -i? Yes, in 30 seconds. But sed would have hit dataAdapterPattern and other false positives. I'd have spent the next hour fixing what sed broke.
Could I have done this with a 200k context Claude session, file by file? Yes, but I'd have had to feed it files one at a time, and it wouldn't have known about cross-file references.
1M context is not magic. It doesn't make Claude smarter. It removes the "I haven't seen the rest of the codebase" excuse. For tasks where that excuse was the actual blocker, the difference is night and day.
What I'd want next
One thing the 1M context didn't help with: my conversation history. Once I'm in the middle of a refactor and I've had 20 turns of dialogue, that history pushes the codebase context out. Anthropic's memory tool and prompt caching help, but for a refactor that genuinely needs both "the whole repo" and "the whole conversation," we're not there yet.
The ceiling moved up. The shape of work that fits under it is the interesting design space now.
Sources: Context windows — Anthropic API docs, Claude Platform release notes. All capability claims verified against Anthropic documentation as of April 2026.