Live data from Hacker News

Claude Sonnet 4 now supports 1M tokens of context

anthropic.com

171–180 of 706 posts

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

#171
post #159

Earlier quoted context omitted.

Well you should look at it, because it's not going through all files. I looked at your product and the workflow is essentially asking me to do manually what Claude Code does auto. Granted, manually selecting the context will probably lead to lower costs in any case because Claude Code invokes tool calls like grep to do its search, so I do see merit in your product in that respect.

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…

FWIW Claude code conversations are also durable. You can resume any past conversation in your project. They're stored as jsonl files within your `$HOME/.claude` directory. This retains the actual context (including your prompts, assistant responses, tool usages, etc) from that conversation, not just the files you're affecting as context.

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

#172
post #122

Earlier quoted context omitted.

Your first week of AI usage should be crawling your codebase and generating context.md docs that can then be fed back into future prompts so that AI understands your project space, packages, apis, and code philosophy. I guarantee your internal tools are not revolutionary, they are just unrepresented in the ML model out of the box

That sounds incredibly boring. Is it effective? If so I'm sure we'll see models to generate those context.md files.

Yes. And way less boring than manually reading a section of a codebase to understand what is going on after being away from it for 8 months. Claude's docs and git commit writing skills are worth it for that alone.

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

#173
post #168
post #132

Earlier quoted context omitted.

In my experience it works better if you create one plan at a time. Create a prompt, make claude implement it and then you make sure it is working as expected. Only then you ask for something new. I've created an agent to help me create the prompts, it goes something like this: "You are an Expert Software Architect specializing in creating comprehensive, well-researched feature implementation prompts. Your sole purpos…

>You always think deeply before giving an answer... Nice try but they're not giving you the "think deeper" level just because you asked.

https://docs.anthropic.com/en/docs/build-with-claude/prompt-...

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

#174
post #25

Earlier quoted context omitted.

Have the AI produce a plan that spans multiple files (like "01 create frontend.md", "02 create backend.md", "03 test frontend and backend running together.md"), and then create a fresh context for each step if it looks like re-using the same context is leading it to confusion. Also, commit frequently, and if the AI constantly goes down the wrong path ("I can't create X so I'll stub it out with Y, we'll fix it later")…

Changing the prompt and rerunning is something where Cursor still has a clear edge over Claude Code. It's such a powerful technique for keeping the context small because it keeps the context clear of back-and-forths and dead ends. I wish it was more universally supported

I do this all the time in Claude Code, you hit Escape twice and select the conversation point to 'branch' from.

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

#175
I’ve tried 2 AI tools recently. Neither could produce the correct code to calculate the CPU temperature on a Raspberry Pi RP2040. The code worked, looked ok and even produced reasonable looking results - until I put a finger on the chip and thus raised the temp. The calculated temperature went down. As an aside the free version of chatGPT didn’t know about anything newer than 2023 so couldn’t tell me about the RP2350

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

#176

Earlier quoted context omitted.

Value is irrelevant. What's the return on investment you get from spending $200? Collecting value doesn't really get you anywhere if nobody is compensating you for it. Unless someone is going to either pay for it for you or give you $200/mo post-tax dollars, it's costing you money.

The return for me is faster output of features, fixes, and polish for my products which increases revenue above the cost of the tool. Did you need to ask this?

Yes, I did. Not everybody has their own product that might benefit from a $200 subscription. Most of us work for someone else and, unless that person is paying for the subscription, the _value_ it adds is irrelevant unless it results in better compensation.

Furthermore, the advice was given to upgrade to a $200 subscription from the $20 subscription. The difference in value that might translate into income between the $20 option and the $200 option is very unclear.

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

#177
post #50

Earlier quoted context omitted.

Inventivatbly the files become a mess of their own. Changes and learnings from one part of the plan often dont result in adaptation to impacted plans down chain. In the end you have a mish mash of half implemented plans and now you’ve lost context too. Which leads to blowing tokens on trying to figure out what’s been implemented, what’s half baked, and what was completely ignored. Any links to anyone who’s built some…

My system is to create detailed feature files up to a few hundred lines in size that are immutable, and then have a status.md file (preferably kept to about 50 lines) that links to a current feature that is used as a way to keep track of the progress on that feature. Additionally I have a Claude Code command with instructions referencing the status.md, how to select the next task, how to compact status.md, etc. Every…

Care to elaborate on how you use the status.md file? What exactly you put in there, and what value does it bring?

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

#178

Earlier quoted context omitted.

For me it’s meant a huge increase in productivity, at least 3X. Since so many claim the opposite, I’m curious to what you do more specifically? I guess different roles/technologies benefit more from agents than others. I build full stack web applications in node/.net/react, more importantly (I think) is that I work on a small startup and manage 3 applications myself.

I have yet to get it to generate code past 10ish lines that I am willing to accept. I read stuff like this and wonder how low yall's standards are, or if you are working on projects that just do not matter in any real world sense.

Standards are going to be as low as the market allows I think. Some industries code quality is paramount, other times its negligible and perhaps speed of development is higher priority and the code is mostly disposable.

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

#179

How does "supporting 1M tokens" really work in practice? Is it a new model? Or did they just remove some hard coded constraint?

Serving a model efficiently at 1M context is difficult and could be much more expensive/numerically tricky. I'm guessing they were working on serving it properly, since its the same "model" in scores and such.

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

#180

I’ve tried 2 AI tools recently. Neither could produce the correct code to calculate the CPU temperature on a Raspberry Pi RP2040. The code worked, looked ok and even produced reasonable looking results - until I put a finger on the chip and thus raised the temp. The calculated temperature went down. As an aside the free version of chatGPT didn’t know about anything newer than 2023 so couldn’t tell me about the RP2350

How can you be sure putting the finger on the chip raise the temp? If you feel hot that means heat from the chip is being transferred to your finger, that may decrease the temp, no?
Post reply on HN