CLI exits 0 when a tool call fails (task add/rm/update, project job get, agent run…)
I maintainer di solito rispondono entro 1 giorno
@lsegal ci sta già lavorando.
Dal 28/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
Every CLI command that goes through dispatcher.CallTool exits 0 when the tool fails. It prints the tool's error text to stdout as if it were a normal result. Scripts and CI can't tell that aviary task add, task update, task rm, task run, project job get and the rest failed.
Steps to reproduce
Against a running server (seen on main at the time of filing):
$ aviary task add assistant weird "x" --every 0m; echo rc=$?
invalid schedule: invalid every "0m": must be at least 1s
rc=0
$ aviary task rm nosuch; echo rc=$?
task "nosuch" not found; use task_list to see tasks
rc=0
$ aviary task update nosuch --every 1h; echo rc=$?
task "nosuch" not found; use task_list to see tasks
rc=0
$ aviary task add nobody t "x" --every 1h; echo rc=$?
agent "nobody" not found; use agent_list to see available agents
rc=0
$ aviary project job get 99999; echo rc=$?
no job #99999
rc=0
$ aviary agent run nobody hi; echo rc=$?
agent "nobody" not foundrc=0 # also no trailing newline
Expected
A tool result with IsError set should make the command exit non-zero and print the message to stderr.
Cause
internal/mcp/dispatch.go Dispatcher.CallTool returns extractText(result), nil and drops result.IsError. CallToolWithProgress already reports isError, and watch.go checks it. All 15 CallTool call sites in cmd/aviary/cmd (agent, agent_resolve, project, task, tool, tool_command, upgrade) inherit the problem.
Suggested fix
Have CallTool return an error, for example ToolError{Text}, when result.IsError is set, so cobra exits 1. Error messages also mention MCP tool names (use task_list, use agent_list). In the CLI they could name aviary task list / aviary agent list instead.
Regression test
A cmd/aviary/cmd test that runs task rm nosuch and task add ... --every 0m against the in-process dispatcher and asserts a non-nil error/non-zero exit.
Created by Engine: /aviary:FC88FDCA
- Lingua principale
- Go
- Stelle
- 12
- Fork
- 5
- Merge medio
- 53m
- PR unite (30g)
- 640
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lsegal/aviary
-
enhancement go
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
E2E: add regression coverage for System → Sessions (agent picker, create, Clear vs Remove, live Stop)Forse già presa @lsegal l’ha presa oggi. Apertajavascript
lsegal/aviary#1673 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: System → Sessions is per-agent, with Create, and Clear for Main Chat (control panel guide is out of date)Forse già presa @lsegal l’ha presa oggi. Apertadocumentation
lsegal/aviary#1672 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di lsegal/aviary
Issue simili
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BaaRai/ARTEX#652 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Add govulncheck workflowApertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
losisin/helm-values-schema-json#437 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni