eca
eca copied to clipboard
customTools do not show stderr in output
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Describe the bug When a customTool is called, stderr is discarded in the output, which means the AI does not see the result
To Reproduce Use a customTool command that outputs errors to stderr:
"command": "clj-nrepl-eval -p $(cat .nrepl-port) {{code}}"
Called ECA tool
clj-nrepl-eval
0.1s
Parameters:
{
"code": "$'(/ 1 0)'"
}
Result:
Empty
When I run manually I see the error on stderr:
λ clj-nrepl-eval -p $(cat .nrepl-port) $'(/ 1 0)'
Execution error (ArithmeticException) at user/eval54955 (REPL:1).
Divide by zero
Expected behavior
if stderr has output, return it in the output to the AI
Doctor
ECA version: 0.81.0
Screenshots
copy/pasted ECA chat output above instead of a screenshot
Additional context
None
Actually I can't repro this issue with this custom command:
"clj": {
"description": "Evaluate Clojure code in the running nrepl server. The tool will wrap whatever code you supply in ANSI-C quoting: $'...' Escaping rules WITHIN $'...': Single quotes should be escaped: \\' Backslashes: \\\\ (for literal \\\\ in Clojure strings use \\\\) Newlines: \\n Double quotes: NO escaping needed Examples: (+ 1 2 3) (println \"Hello\") (str \"It\\'s working\") (let [x 10]\\n (* x 2))' DO NOT double-escape (use \\' not \\\\').",
"command": "clj -e '{{code}}'",
"schema": {
"properties": {
"code": {
"type": "string",
"description": "A string of clojure code to evaluate in the application runtime. It will be wrapped in ANSI-CE quoting automatically: $'...' be sure to escape single quotes as \\', backslashes as \\\\. Example: $'(let [r (+ 1 2 3)] (println r))'"
}
},
"required": ["code"]
}
}
looks like ECA is parsing properly stderr and stdout