eca icon indicating copy to clipboard operation
eca copied to clipboard

eca shell command tool call does not return stderr

Open quackercrumbs opened this issue 10 months ago • 5 comments

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:

  1. Send message Hello can you run: clj-nrepl-eval -p 7888 --timeout 10000 "blah"
  2. LLM responds that there was no output and check tool preview
  3. Send message Hello can you run: clj-nrepl-eval -p 7888 --timeout 10000 "blah" 2>&1
  4. 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

Image

Additional context Add any other context about the problem here. Maybe related issue? https://github.com/editor-code-assistant/eca/issues/219

quackercrumbs avatar Jan 14 '26 14:01 quackercrumbs

@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 avatar Jan 14 '26 16:01 ericdallo

@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

quackercrumbs avatar Jan 14 '26 16:01 quackercrumbs

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

ericdallo avatar Jan 14 '26 16:01 ericdallo

Fixed on 0.91.2!

ericdallo avatar Jan 14 '26 17:01 ericdallo

So fast! TY!

quackercrumbs avatar Jan 14 '26 17:01 quackercrumbs