You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Shell stderr visibility (shell.go)
When a shell command fails with exit status 1 AND has stderr output,
the stderr is now returned as the tool result instead of a bare
'error: shell: exit status 1'. The LLM can see WHY it failed.
2. Agent-loop error guard (loop.go)
New maxConsecutiveToolErrors tracking per tool. When a tool errors
3+ times consecutively, the loop injects a corrective system message:
- Directory errors -> suggests tree/search_files
- Shell failures -> suggests read_file/simpler commands
- Not found errors -> suggests search_files/glob
- Binary file errors -> suggests base64/checksum
- Generic errors -> suggests alternative tools
3. Actionable directory-error messages (perf_tools.go, file_tool.go)
read_file/batch_read/count_lines now say 'use tree or glob'
instead of bare 'is a directory, not a file'.
Together these prevent the 23-iteration shell-fallback spiral
observed in production: directory error -> abandon read_file ->
15 iterations of broken shell commands.
0 commit comments