Live data from Hacker News

Claude Sonnet 4 now supports 1M tokens of context

anthropic.com

491–500 of 706 posts

Re: Claude Sonnet 4 now supports 1M tokens of context

#491
post #42

Earlier quoted context omitted.

> I really desperately need LLMs to maintain extremely effective context I actually built this. I'm still not ready to say "use the tool yet" but you can learn more about it at https://github.com/gitsense/chat . The demo link is not up yet as I need to finalize an admin tool but you should be able to follow the npm instructions to play around with. The basic idea is, you should be able to load your entire repo or rep…

Why not build this as an MCP so that people can plug it into their favorite platform?

An MCP is definitely on the roadmap. My objective is to become the context engine for LLMs so having a MCP is required. However, there will be things from a UX perspective that you'll lose out on if you just use the MCP.

Re: Claude Sonnet 4 now supports 1M tokens of context

#492
post #423

One of the most helpful usages of CC so far is when I simply ask: "Are there any bugs in the current diff" It analyzes the changes very thoroughly, often finds very subtle bugs that would cost hours of time/deployments down the line, and points out a bunch of things to think through for correctness.

I am trying this tomorrow

Let me know how it goes. It’s a game changer

Re: Claude Sonnet 4 now supports 1M tokens of context

#493
post #283

Earlier quoted context omitted.

> Just got out of a 15m huddle with someone trying to understand what they were doing in a PR before they admitted Claude generated everything and it worked but they weren't sure why... But .. that's not the AI's fault. If people submit any PRs (including AI-generated or AI-assisted) without completely understanding them, I'd treat is as serious breach of professional conduct and (gently, for first-timers) stress tha…

If you have to review what the LLM wrote then there is no productivity gain. Leadership asks for vibe coding

I suggest you upgrade your code review skill. I find it vastly quicker in most cases to review code than write it in the first place.

Re: Claude Sonnet 4 now supports 1M tokens of context

#494

I hope that they are going to put something in Claude Code to display if you're entering the expensive window. Sometime I just keep the conversation going. I wouldn't want that to burn my Max credits 2x faster.

Yeah, that 1 MM tokens is a $15 (IIRC) API call. That's gonna add up quick! My favorite hypothetical AI failure scenario is that LLM agents eventually achieve human level general intelligence, but have to burn so many tokens to do it that they actually become more expensive than a human.

Re: Claude Sonnet 4 now supports 1M tokens of context

#495

Earlier quoted context omitted.

I'm not sure how, and maybe some of the coding agents are doing this, but we need to teach the AI to use abstractions, rather than the whole code base for context. We as humans don't hold the whole codebase in our hear, and we shouldn't expect the AI to either.

/compact in Claude Code is effectively this.

Compact is a reasonable default way to do that, but quite often it discards important details. It's better to have CC to store important details, decisions and reasons in a document where it can be reviewed and modified if needed.

Re: Claude Sonnet 4 now supports 1M tokens of context

#496

My experience with the current tools so far: 1. It helps to get me going with new languages, frameworks, utilities or full green field stuff. After that I expend a lot of time parsing the code to understand what it wrote that I kind of "trust" it because it is too tedious but "it works". 2. When working with languages or frameworks that I know, I find it makes me unproductive, the amount of time I spend writing a goo…

I really find your experience strikingly different than mine, I'll share you my flow:

- step A: ask AI to write a featureA-requirements.md file at the root of the project, I give it a general description for the task, then have it ask me as many questions as possible to refine user stories and requirements. It generally comes up with a dozen or more of questions, of which multiples I would've not thought about and found out much later. Time: between 5 and 40 minutes. It's very detailed.

- step B: after we refine the requirements (functional and non functional) we write together a todo plan as featureA-todo.md. I refine the plan again, this is generally shorter than the requirements and I'm generally done in less than 10 minutes.

- step C: implementation phase. Again the AI does most of the job, I correct it at each edit and point flaws. Are there cases where I would've done that faster? Maybe. I can still jump in the editor and do the changes I want. This step in general includes comprehensive tests for all the requirements and edge cases we have found in step A, both functional, integration and E2Es. This really varies but it is generally highly tied to the quality of phase A and B. It can be as little as few minutes (especially true when we indeed come up with the most effective plan) and as much as few hours.

- step D: documentation and PR description. With all of this context (in requirements and todos) at this point updating any relevant documentation and writing the PR description is a very short experiment.

In all of that: I have textual files with precise coding style guidelines, comprehensive readmes to give precise context, etc that get referenced in the context.

Bottom line: you might be doing something profoundly wrong, because in my case, all of this planning, requirements gathering, testing, documenting etc is pushing me to deliver a much higher quality engineering work.

Re: Claude Sonnet 4 now supports 1M tokens of context

#497
post #340

Earlier quoted context omitted.

If you have to review what the LLM wrote then there is no productivity gain. Leadership asks for vibe coding

> If you have to review what the LLM wrote then there is no productivity gain. I do not agree with that statement. > Leadership asks for vibe coding Leadership always asks for more, better, faster.

> Leadership always asks for more, better, faster.

More and faster, yes. Almost never better.

Re: Claude Sonnet 4 now supports 1M tokens of context

#498

I believe this can be configured in Claude Code via the following environment variable: ANTHROPIC_BETAS="context-1m-2025-08-07" claude

Have you tested it? I see that this env var isn't specified in their docs https://docs.anthropic.com/en/docs/claude-code/settings#envi...

Yup! Claude Code has a lot of undocumented configuration. Once I saw the beta header value in their docs [1], I tried to see in their source code if there was anyway to specify this flag via env var config. Their source code is already on your computer, just gotta dig through the minified JS :) Try:

`cat $(which claude) | grep ANTHROPIC_BETAS`

Sibling comment's approach with the other (documented) env var works too.

[1] https://docs.anthropic.com/en/docs/build-with-claude/context...

Re: Claude Sonnet 4 now supports 1M tokens of context

#499
post #5

Strange that they don't mention whether that's enabled or configurable in Claude Code.

From a co-marketing POV, it's considered best practice to not discuss home-grown offerings in the same or similar category as products from the partners you're featuring. It's likely they'll announce this week, albeit possibly just within the "what's new" notes that you see when Claude Code is updated.

They just sent an email that the feature is in beta in CC.

Re: Claude Sonnet 4 now supports 1M tokens of context

#500
post #159

Earlier quoted context omitted.

Looking at the code, it does have some sort of automatic discovery. I also don't know how scalable Claude Code is. I've spent over a decade thinking about code search, so I know what the limitations are for enterprise code. One of the neat tricks that I've developed is, I would load all my backend code for my search component and then I would ask the LLM to trace a query and create a context bundle for only the files…

It greps around the code like an intern would. You have to have patience and be willing to document workflows and correct when it gets things wrong via CLAUDE.md files.

Honestly, grepping isn't a bad strategy if there is enough context to generate focused keywords/patterns to search. The "let Claude Code think for 10 minutes or more", makes a lot more sense now, as this brute force method can take some time.
Post reply on HN