CLI exits 0 when a tool call fails (task add/rm/update, project job get, agent run…)
Les mainteneurs répondent en général sous 1 jour
@lsegal y travaille déjà.
Depuis le 28/11/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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
- Langage dominant
- Go
- Étoiles
- 12
- Forks
- 5
- Merge moyen
- 53 min
- PR mergées (30 j)
- 640
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lsegal/aviary
-
enhancement go
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
E2E: add regression coverage for System → Sessions (agent picker, create, Clear vs Remove, live Stop)Peut-être pris @lsegal l’a pris aujourd’hui. Ouvertejavascript
lsegal/aviary#1673 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Docs: System → Sessions is per-agent, with Create, and Clear for Main Chat (control panel guide is out of date)Peut-être pris @lsegal l’a pris aujourd’hui. Ouvertedocumentation
lsegal/aviary#1672 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de lsegal/aviary
Issues similaires
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingPeut-être pris @chaitanya0305 l’a pris aujourd’hui. Ouvertebug P2
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
BaaRai/ARTEX#652 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
compiler-explorer/compiler-explorer#9710 ·
Les mainteneurs répondent en général sous 1 jour
-
Add govulncheck workflowOuverteenhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
losisin/helm-values-schema-json#437 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 2 jours