Don't trust large context windows

(garrit.xyz)

41 points | by computersuck 2 hours ago

16 comments

  • kelnos 45 minutes ago
    This has not been my experience with Opus since Anthropic released the 1M token context window for use under the subscription plans. I routinely push past 500k tokens, even sometimes up to around 800k tokens, and don't see this problem. I've seen it to some extent when getting truly near the limit, up around and above 900k tokens, though what I see isn't as severe as the author seems to see.

    (And I rarely fill the context window that far anyway when working on a single task, or a series of tasks that are related enough to warrant the same context; more typical is anywhere between 200k and 600k or so.)

    I'm not saying that no one ever has this experience, but it's odd to me that some people see it so often that it warrants giving it a name.

    • Bolwin 20 minutes ago
      I see this said often and find it insane given how many times I find opus models making basic recall mistakes at <100k tokens.

      Personally I consider < 60k to be the smart zone for opus. This is worse for opus 4.7 and 4.8 cause of the more granular tokenizer

      • eterm 15 minutes ago
        60k is tiny, if it's making recall mistakes that early then you might have some false memories or incorrect instructions in your CLAUDE.md.

        60k isn't much bigger than the system prompt.

        • danielbln 5 minutes ago
          Yeah 60k is ludicrous, I've barely seeded the context at that point and I don't see context related degradation until well into the 600-700k.
        • da_grift_shift 2 minutes ago
          >you might have some false memories or incorrect instructions in your CLAUDE.md

              "YOU'RE HOLDING IT WRONG!"
      • wg0 9 minutes ago
        Not specific to Opus but yes it would make mistakes. I usually try to keep context window under 10%
      • properbrew 8 minutes ago
        I hate to do the "you're holding it wrong" trope, but I think you might have something misconfigured somewhere unless you missed a 0, because just past 60k tokens is such a small context window to be seeing issue in.

        Do you have any old documentation that it's picking up and referencing? If you set all claude settings back to default do you see the same issue?

    • arcanemachiner 28 minutes ago
      Opus 4.6 was on drugs past 200k, I skipped 4.7, 4.8 did good up to ~350k, and Fable did great beyond 400k, in my limited testing. The quality does appear to be trending upwards.
    • csomar 2 minutes ago
      I have a custom build command for a rust project (yarn build:lib) and my experience is 120k for GLM and roughly 200-300k for Opus. After that, they default to cargo build.
    • asd88 36 minutes ago
      I’ve had similar experiences with Fable. 70%+ context used out of 1M, still sharp and no memory issues.
    • fullstackchris 30 minutes ago
      Thats another problem of this post, the author mentions Claude but not explicitely what models...

      100k tokens "by lunch" is also not my finding, the newer models will hit that already right in the initial exploratory phase

      • stavros 2 minutes ago
        I found "by lunch" odd too, but considering that Claude wrote the article, it's not going to know specifics.
      • arcanemachiner 28 minutes ago
        Really depends on the project.
    • cyanydeez 18 minutes ago
      As the gamblers say at the poker table: If you can't figure out who the mark is when you site down...
  • jackxlau 4 minutes ago
    In my own testing I have seen peak performance happen usually within 15-20% of the intended context limit, albeit there are a few optimizations depending on the task quality.
  • mg 44 minutes ago
    Considerations about what goes on in agents internally will probably not be part of software development for long.

    Personally, I already see LLMs and agents as blackboxes. I give each feature request to multiple LLMs and then compare the results. I don't manually use "sessions" at all. I just look at the outcome. When I dislike it, I "git reset --hard", change my prompts and restart the feature request.

    To have an ongoing sense of which agents perform best, I keep a log and calculate an ELO score of which agents meet my demands best. This score is imporant to me, not so much how the agent achieves it.

    • hypfer 36 minutes ago
      This is an absolutely crazy wasteful thing to do considering the actual cost of all that inference and nothing to be proud of.
      • mg 4 minutes ago
        It is the other way round.

        In an interactive session, adding "Fine, but make the button red" after the model generated a first solution more than doubles the tokens used. As the model now not only gets the original code and the feature request but also the updated code plus the change request as input tokens.

        Sending a feature request to an LLM and then sending the feature request again with "The button shall be red" only doubles the tokens used.

      • redox99 3 minutes ago
        Probably like 1% of the energy an average person spends on driving.
      • cyanydeez 16 minutes ago
        come on now, we can't just not escape the permanent underclass by using our brains, we've also got to use up all the resources while doing it.
  • kristianc 59 minutes ago
    I'm getting a lot of mileage out of basically acting like the AI's Product Manager, and insisting that it writes up short PRDs for every feature we propose to build. That gives it a reference over time of everything that has been built, but also makes it less liable to drift with each one. Each one gets its own conversation. For me this is a happy medium between stopping it going off the rails but also making sure it can reference past decisions when it needs to. The one thing I dislike about Pocock's method (not to use PRDs so much but to have an in depth discussion to get alignment) first is it wastes a lot of the best window on that initial back and forth.
    • nopurpose 41 minutes ago
      Is it adhoc or you use more structured approaches like openspec? I also tend to work on a plan first, but it stays as in-session todo, which is hard to reference later.
      • kristianc 33 minutes ago
        It's ad hoc / my own framework, just found something which works for me. The exact structure is

        - Work Mode - HITL/AFK

        - Problem Statement

        - Who It Affects - Primary / Secondary User

        - User Stories

        - Business Case

        - Why Now

        - Success Critera

        - In Scope/Out of Scope [Out of Scope v. important)

        - Thinnest Slice (This I've found super valuable, means you max out the amount of 'product' for your buck and avoid diminishing marginal returns or overbuilding. Often I will build this)

        - Eigenfeature - What is the larger feature we _could_ (but probably won't) which would solve for this use case and other stuff I might not have thought of

        - Technical Notes

        - Deps

        - Schema Changes

        - Risks

        - Final Recommendation [go / no go, including on scope]

        There's a note in my Claude / Agents MD which says no net new feature gets introduced without this and I get it to move through a pipeline of folders (active, approved, shipped, proposed etc). All runs in a system of MD files and have even created a little MD Kanban from the metadata!

  • PeterStuer 39 minutes ago
    I've had no problem with Claude Code Opus 4.8 effort max using 20% token context (200k) on software development tasks (all stages). I aways load core source files and the ones we are working on up front. Around 20%, I make it autoprepare for a new session and clear.

    Admittedly I have been doing this precautiously, based on anecdotal evidence, not because I had bad experiences with longer context deterioration myself.

    In the brief time I had access to Fable 5, it went on long running tasks (>45 mins) into the 30-40% zone without apparent context coherence problems.

  • walthamstow 14 minutes ago
    There's an env var you can set in Claude Code to bring the autocompact threshold down, effectively setting your own max context window. I have it at 400k.
  • afc 59 minutes ago
    The approach we're taking to deal with this very real context rot is using a bunch of related techniques which we call transposing the agent loop: https://alejo.ch/3jt

    In essence, we run many short agent loops, generating their prompts dynamically from structured data. Each loop advances the state in a small step towards the final goal.

  • mightyham 32 minutes ago
    Even taking the author's criticism about large context windows for granted, which in my experience are exaggerated, they are still a huge UX improvement over short windows. That reason alone is enough for me to support them.
  • mcapodici 1 hour ago
    I /clear all the time out of habit. I want to be able to get the thing done with minimal context. It also means you can do it again slightly different if needed, you know the seed conditions for the task.
  • da-x 2 hours ago
    Perhaps compacting the context can be made in multiple requests over smaller and overlapping chunks to avoid using the 'dumb zone', and for yielding a better result.
  • petesergeant 18 minutes ago
    Is there any chance that this is because training corpus largely consists of documents shorter than the advertised context windows?
  • mock-possum 33 minutes ago
    Hasn’t been my experience at all - 1M window is a very clear upgrade working with Claude code.
  • 3vo-ai 12 minutes ago
    [flagged]
  • Dollarland 42 minutes ago
    [flagged]
  • breakthematrix 2 hours ago
    [flagged]