eca icon indicating copy to clipboard operation
eca copied to clipboard

Stuck after overflowing the context with tool/MCP output

Open lockie opened this issue 6 months ago • 1 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Sometimes when the tool output is too big for the context window to handle, ECA@Emacs gets into weird stuck state, where prompts are silently ingored after the timer ticking for ~4s.

To Reproduce

Steps to reproduce the behavior:

  1. Open a new ECA session by running M-x eca
  2. Send the following prompt:

    Please clone the repository at https://gitlab.com/lockie/docker-lisp-gamedev to a temporary directory. Read the AGENTS.md instructions from it. It contains the CI pipeline for Gitlab CI, please replicate what should happen in that pipeline locally, i.e. build the Linux variety of Docker image and run Linux/SDL2 test. DO NOT at any circumstances use subagents, run it directly.

  3. Accept all tool invocations; Accept+remember bg_job read_output tool
  4. Watch ECA gets stuck at some point: the timer stops, sending any prompts does not do anything except for the timer tick for about 4 seconds

Expected behavior

The context overflows by tools/MCP servers is handled properly.

Doctor

ECA version: 0.134.1

Server cmd: /home/andrew/.emacs.d/eca/eca server

Workspaces: /home/andrew

Default model: z-ai/glm-5.1 (API key (dec**********i1t))

Logged providers: None
Relevant env vars: 


Credential files:
  /home/andrew/.netrc:
    Readable: true
    Permissions: secure
    Credentials: 11

Screenshots

Image Image Image

lockie avatar May 17 '26 01:05 lockie

It appears to be my mistake: I've configured my provider, Z.AI, manually, which caused incorrect readings from models.dev, including the maximum context window size. I've fixed my configuration and I'll reopen if the issue still persists after that.

lockie avatar May 17 '26 20:05 lockie