Optional `description` param on `shell_command`, used as the tool call's label

Ouverte Adaptée aux débutants
#717 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
72/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
clojure
Domaine
ai, tooling

Piste de recherche

Commence dans le namespace shell tools, où shell_command est défini : trouve la map de schéma contenant la propriété command et le vecteur required, ainsi que la fonction de résumé eca.modules.tools.shell/shell-command-summary qui construit l'en-tête affiché pour un appel. Ajoute une propriété chaîne description optionnelle et laisse required comme ["command"], puis fais en sorte que le résumé l'utilise comme en-tête avec la commande conservée dans les détails, en revenant à l'en-tête actuel lorsqu'elle est absente. Terminé signifie qu'un appel portant description affiche ce label et qu'un appel sans elle affiche exactement comme avant ; vérifie les tests shell tool existants pour les assertions du résumé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Problem

Some models send a short label with each shell call, even when the schema has no field for it. They probably learned this in training, from harnesses whose shell tool has such a field. Since #632, ECA rejects these calls with INVALID_ARGS, so each one costs a failed call and a retry turn.

#633 found that 1,861 of 2,288 rejected unknown args were a description arg (GLM, Kimi, DeepSeek). With Tencent's Hy4-flash I see the same with summary:

{"command": "grep -aiE 'album|track|...' ~/.cache/app/logs/app.log | tail -n 100",
 "summary": "Grep log for album and error lines"}
→ INVALID_ARGS: unknown params: `summary`. Supported params: `command` (required), ...

The labels are good, though. For long or piped commands, "Grep log for album and error lines" reads better than today's header $ grep -aiE 'album|tra....

Proposal

  • Add an optional description param to shell_command ("A short description of what this command does (5-10 words), shown to the user as the label of this call.").
  • When present, eca.modules.tools.shell/shell-command-summary uses it as the header; the command stays in the details. When missing, nothing changes.
  • required stays ["command"].

Other harnesses mostly call this field description and keep it optional: Claude Code, Gemini CLI and Qwen Code (optional), Crush (required), VS Code Copilot (explanation, required). OpenCode had a required description and removed it (anomalyco/opencode#32823); an optional field avoids that cost.

Quick test

Hy4-flash, ECA 0.173.2's shell_command schema and prompt, 20 tasks × 5 samples = 100 calls per schema, temperature 0.7. The second run only added the description property to the schema:

"properties": {
  "command":     { ... },
  ...
  "description": { "type": "string",
                   "description": "Optional. A short description of what this command does (5-10 words), shown to the user as the label of this call." }
},
"required": ["command"]
Schema description sent summary sent
today 3 / 100 (rejected) 0 / 100
+ optional description 99 / 100 0 / 100

Given the field, the model filled it in 99 of 100 calls ("Check Docker status and list containers", "Run Maven test suite", "Show sorted sizes of /var/log subdirectories") and never invented another name. The one call without it was npm run dev with background: "dev-server". This is a short system prompt with one tool, not a full ECA session.

Cons

More tokens, measured with Hy4's tokenizer on the calls above:

  • The schema property adds ~41 tokens to every request. It never changes, so prompt caching covers it.
  • Each label adds ~12 tokens to the call (median; 10–19 including the JSON key). The model generates them once, and they stay in the history after that. 50 shell calls add ~600 tokens.
  • A rejected call costs more per occurrence: the 29-token INVALID_ARGS result, the repeated call (~26 tokens of args) and one extra round trip. But with Hy4 only 3 of 100 calls were rejected, so for this model the tokens do not pay for themselves. The main gain is the readable label.
Langage dominant
Clojure
Étoiles
1k
Forks
82
Merge moyen
1 j 20 h
PR mergées (30 j)
22

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de editor-code-assistant/eca

Toutes les issues de editor-code-assistant/eca

Issues similaires

Plus d'issues Clojure

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.