Premium request overconsumption with Copilot
Hello there!
First, bravo for ECA, it's really amazing and I love it with emacs.
I currently work for a company with a Github Copilot business plan. This month, I just overconsumed my premium request quota, I'm at 243% and I mainly used model Sonna 4.5 and a bit of GPT-5.1
I recall login often when launching ECA (thought I needed to login everytime) and I used ECA to build Gitlab CI file.
Do you see or know anything that could have contributed to sky rocket my quota?
We don't have details of consumptions, I just have this percent: 243% of premium request usage and my coworkers with other client like VScode or Intelliji (both without ECA) are fines with the limit (they are like 20/30% for example)
If you have no lead, you can close this issue, thanks!
Hey, glad you are liking it! I'm not aware of any issues in ECA regarding that, actually, we do use less tokens in system prompt than other tools to be honest. Maybe it's something we could be missing from openai-chat API @zikajk ? not sure, nothing comes to mind
I recall having sometimes the chat stopping. The prompt is responding and applying modifications (in agent mode) and then I get an error and I have to eca-restart. I cannot provide you the error code sadly.
Is there a way to retrieve previous chats or sessions? On github copilot we don't have the informations of usage, but maybe we can do it with eca? If it's a feature it could be a great feature. Being able to see how many tokens or premium requests are used for a prompt or a session could help to improve the usage.
yes, you can resume via /resume
We also have this usage info available already:
- you can check the system prompt sent to LLM via
/prompt-show - every LLM interaction we update the usage down there on right
I'll try to check with /resume to see if I can get details on January.
I don't think I reached the session's limit, if so it should be less than 3. I'm wondering if some requests went crazy by taking all the project directory (with all sub directories) and did a lot of requests. It's frustating to see this 243% usage but not be able to explain it haha.
By the way thanks for responding, tell me if you want me to close the issue
EDIT: I tried /resume, I only have one chat in January sadly :(
EDIT2: with /prompt-show, I see my personnal folder as Workspaces, maybe this is it? If I do a request in a work project can it uses the personnal folder, it would explain why there a big consumption?
EDIT2: with /prompt-show, I see my personnal folder as Workspaces, maybe this is it? If I do a request in a work project can it uses the personnal folder, it would explain why there a big consumption?
That's likely to affect, if you start eca in a home folder or something, ECA won't know the workspace root and it will consider your current folder, so when you ask something to LLM it needs to find the project you are talking about in all your home which may result and multiple "Listing directory tree" and "Read files" operations which may be expensive, check your chat.
One way to confirm the workspace root is via /doctor too.
I did a quick test using Claude Sonnet 4.5 model (x1) in Emacs ECA and VS Code standard copilot.
The request was in french: "Can you do a review of Staged changes?"
ECA asked me to run 2 git commands to get the status.
With Visual Studio Code (no custom agents) = 0,3% of premium requests With ECA = 1% of premium requests
I think VS Code or Intellij with the "official" Copilot client do not consume as much as custom client and benefits from the ecosystem.
EDIT:
I also have this error when it's working too much (for example I said yes to apply the suggestions)
LLM response status: 400 body: {"error":{"message":"messages.39.content.1.tool_use.input: Input should be a valid dictionary","code":"invalid_request_body"}}
Could it be linked to french speaking and should do my requests in english?
@romainonweb I don't think langauge matter here, in the end depends on the tokens used and every prompt may result in multiple tokens not deterministic.
We would need to compare both chat conversations to see, but I yet have no idea how it could be eca's fault. c/c @zikajk in case you think on anything
About that error, I believe it's a MCP with problems in the tool, we could discuss in a new issue since it will require more debugging
Hey Guys, I've seen a similar issue on gptel with a fix, maybe that could be related, I dunno : https://github.com/karthink/gptel/issues/1224
@romainonweb Can this error be caused by LLM calling tool with a corrupted JSON (it is something I am working on)? Maybe it has been string and we've sent it back? Would be interesting to see LOGs.
@ericdallo Yes, we would need to compare both chat conversations :-).
The issue linked by @SamuelVanie seems to be similar to mine!
@zikajk I'll open a different issue for this, you shall tell me how I can provide all the necessary logs and inputs to analyze this, I'll give all of I can, thanks :)
I think we can try gptel headers fix to see if changes anything
@romainonweb Thanks. I think you would have to compile ECA with --debug-trace, correct @ericdallo ?
I tested and indeed improves the consumption:
- Before the change: 1% when LLM running 1 tool + output
- After the change: 0.6% when LLM running 1 tool + output
So I'm releasing a version with this fix and closing this, LMK if any issues!
There’s a lot of mention of tokens in this issue, but tokens do not matter for copilot billing. Yes, there is technically some temporary rate limit, but I’ve never reached it and have only heard about someone reaching it by running a ralph loop for something like 2+ hours. There is also some ambiguity in the documentation about subagents where they might change this at some point, but at least for now, subagents in the copilot cli do not consume any additional premium requests in my testing. 1 prompt is basically 1 premium request, no matter how many tool calls or subagents are invoked or how many millions of tokens you feed in or how many times you provide inline feedback on changes or how long the agent works for. In terms of cost, this makes it really convenient to use github copilot with their official tools and really inconvenient to use it with others.
ECA still rapidly burns through premium requests compared to the official copilot cli or copilot chat, especially with subagents (difference is potentially 10-100x+ more requests with eca vs. using copilot cli intelligently). This is the case for other non-copilot harnesses like opencode as well, and I don’t know if it can be optimized more, but if it’s not fixable, I think there should be a warning in the documentation.
Interesting, I wasn't aware of that @noctuid , I believe if you what you mentioned how copilot works for 1 prompt is true, they probably return some kind of id in the response header where we can reuse it and have same behavior
@noctuid I'm doing some research and found this might happen only for gpt-5.3codex and gpt-5.4 which passes throught openai-responses and don't have a fix I did months ago for openai-chat, what model did you test it?
Released eca 0.110.2 which fixes those tissues! all is based on the x-initiator header which can be user or agent:
- subagents now pass
agentinstead ofuser, so it should not count as premium requests. - chat title now uses
agentinstead ofuser, reducing by half the premium requests usage. - gpt-5.3-codex and gpt-5.4 had a bug so every tool call/llm roundrip was spending one premium request.
Thanks for the report @noctuid! LMK if any more problems
That's fantastic! Eca now has much better support for copilot than opencode, which is supposed to be officially supported :joy:. Some thoughts:
- I thought I might have saw 2 requests used at some point, but haven't been able to replicate that (may have mistakenly done something). Subagents appear to not use extra requests now. I'll keep an eye out for any issues.
- Auto-compact did not use an extra premium request (opencode is still bugged here and doesn't send x-initiator as agent). ECA hung both times I tested after auto-compacting in a subagent though (think unrelated, is this a known issue?). I got https://github.com/editor-code-assistant/eca-emacs/issues/177 after stopping the prompt, but that may just be because it hadn't done anything in 15 minutes.
- (I don't think manual /compact uses a premium request in copilot cli either, but I've never manually compacted)
- Steering/queueing - does use a premium request, but it does in the copilot too
Question about steering: some harnesses have two types. Is eca just waiting until finished to send the queued messages, or is it trying to intervene sooner? It wasn't totally clear to me when testing
That's great!!
Yeah, queueing is yet not ideal in UI I wanna improve that soon, but it's just a normal user prompt sent after finished, so it should use a premium request anyway. I will still read your other issues, but I'm not aware of any issues on ECA side related to timeouts or getting stuck, probably things on LLM side.