eca shell command tool call does not return stderr
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Describe the bug When the eca shell command runs a command that only outputs stderr, the results aren't visible in the tool preview / the chat session.
To Reproduce
I'm using eca-nvim and have clj-nrepl-eval setup.
Steps to reproduce the behavior:
- Send message
Hello can you run: clj-nrepl-eval -p 7888 --timeout 10000 "blah" - LLM responds that there was no output and check tool preview
- Send message
Hello can you run: clj-nrepl-eval -p 7888 --timeout 10000 "blah" 2>&1 - LLM responds that it sees an error and check tool preview
Expected behavior Tool Result should contain stderr output
Doctor
Paste the relevant parts of /doctor command from chat if applicable:
> /doctor
ECA version: 0.91.1
Server cmd: /Users/calvinquach/.cache/nvim/eca/eca server
Workspaces: /Users/calvinquach/projects/eca-nvim
Default model: anthropic/claude-sonnet-4.5
Screenshots
Additional context Add any other context about the problem here. Maybe related issue? https://github.com/editor-code-assistant/eca/issues/219
@quackercrumbs we do respond with the stderr for custom tools here, and eca shell command here, did you try with custom tools as well? like here
@ericdallo Thanks for the speedy reply!
I haven't tried out custom tools, i'll try it later today and report back!
Looking at the code reference you shared, it seems like clj-nrepl-eval returns a status of 0 even when there is output to stderr, so it might be going in the previous cond branch, which only returns the out
- https://github.com/editor-code-assistant/eca/blob/b9f558438455cf4462d6543c05b547dee2d4f262/src/eca/features/tools/shell.clj#L102-L105
⋊> ~/projects clj-nrepl-eval -p 7888 --timeout 10000 "blah" 2>err.txt 11:52:22
⋊> ~/projects echo $status 11:52:24
0
⋊> ~/projects cat err.txt 11:52:26
Syntax error compiling at (REPL:0:0).
Unable to resolve symbol: blah in this context
⋊> ~/projects
Hum, good catch! I remember it was on purpose I did that afraid that some CLI commands could output lots of noise even for succeeding tasks, but on a second thought I'm not sure that's ECA's fault and LLM can always supress with flags, I will change that
Fixed on 0.91.2!
So fast! TY!