Provide a realtime insight into context window and token usage

Currently Agent mode is unconfined (unchained), given a task it goes on and on, creating every aspect of it. It could have been good, if it kept a proper memory of everything it did and why. But from what I understand it’s very limited in that and we developers have no clue whether it already started to overflow and forgetting stuff or not. I think we should have two things here: first - an indication of how much of available context (with a current model) we already ate up; second - actually confine agent mode to only do what it is being instructed to do and not going around in every aspect of application indefinitelty (or rather until it drains the whole quota).

6 Likes

I was able to confine Agent mode with multiple dedicated and global cursor rules. As to another request about giving a better insight into context (and tokens) turns out there’s this tool - Roocode and it provides just that, almost exactly how I imagined it :person_shrugging:

Add-ons are adding a layer of brittleness. This is especially true in the context of updates to cursor itself, which, as far as I can tell, almost always introduce new problems. This is not a good situation. “Simple” things like token/request usage or context usage/exhaustion should be ABSOLUTELY be part of core cursor.

But I guess that won’t happen. The latest updates get dumber and dumber. Now we have default auto-selection of the underlying model. We can’t even SEE which model we are currently engaging with. And upon a model switch, the context window is lost. 0.48 has proven to be useless to me. I, for now, continue with 0.45.

It the cursor team does not shape up, they will ship out. Or maybe not, if enough ppl. are willing to dish out the subscription cost just for a plaything that can one-shot a tetris game. Who knows.

Are you sure this is the case? Terrible idea.

I tried to downgrade once, but this by itself broke many things. I probably won’t dare anymore. At least not until I finish current project. Or unless they introduce a safe procedure for downgrading. I’d prefer they stop enforcing updates.

To be clear - I completely agree with @gschlomk - insight that I suggested should be part of Cursor. I didn’t mean that extension solves my problem - I didn’t even install it. Screenshot that I posted was meant to demonstrate what I had in mind, and that it is actually quite possible to implement.

I run my AI coding in a dedicated virtual machine. (I would NEVER give an agent AI access to a production machine!). Before I do any installs, updates or upgrades, I create a snapshot of the machine. This time, I did not need to use the snapshot. If you retain your old cursor appimage, you should still be able to run the old one.

I suspect that a project, once opened & saved with a newer version, might cause trouble if you try to load it in an older version of cursor. But I have not tested that.

1 Like

That’s a neat idea, and actually makes so much sense. But I got upgraded while ago, when they were actually enforcing upgrades, so that there’s was no choice to stay on the old version. Upgraded automatically as soon as you’d open the IDE. I assume it doesn’t happen anymore, or how do you manage to stay on old version?

1 Like

I’m running on Linux Mint 21, and there the updates never ever worked, neither manual nor automatic. (To update, I have to manually download and install the new version)

Seems that bug turns out to be a bonus! There is little I hate more than forced updates on any system.

I’ve just witnessed it, realtime. Witnessed how in the middle of conversation model completely forgot what it did just moments ago. It felt like instead of easing context window, by phasing out irrelevant details, it just purged it fully empty. Shocking.

What surprises you? That’s how all LLM models work. They can’t discard unnecessary context, or rather, they can, but cases like yours happen.

Discarding parts of context should be more intelligent I guess. No way it can simply go and forget everything about what it just did. It’s worse than starting a new thread, 'cause in the latter case you at least are sure that model doesn’t remember anything unless you tag it explicitly. Also visual representation of the context and maybe even interactive way of purging this or that part of it (via summarizing or excluding unrelated parts) might help immensely. At least there will be less reasons to blame Cursor team for it’s unsuccessful “magic”.

1 Like

I don’t know if you are aware but this functionality already exists in the three dots of the Corner just below Each message that the bot returns shows exactly the size of the context that was used current present moment just put the mouse over it has no secret

We’ll be adding more context visibility in the coming releases!

1 Like

claude 3.7 requests is very slow,i am pro user,need ten minutes.very very slow.

Didn’t know that. Thanks. However it’s not that useful in such form, IMO.