Stuck after overflowing the context with tool/MCP output
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:
- Open a new ECA session by running
M-x eca - 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.
- Accept all tool invocations; Accept+remember
bg_jobread_outputtool - 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
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.