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

Abierto Apto para principiantes
#717 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
clojure
Área
ai, tooling

Línea de trabajo

Empieza en el namespace de shell tools, donde se define shell_command: encuentra el mapa de esquema que contiene la propiedad command y el vector required, y la función de resumen eca.modules.tools.shell/shell-command-summary que construye la cabecera que se muestra para una llamada. Añade una propiedad de cadena description opcional y deja required como ["command"], luego haz que el resumen la use como cabecera con el comando mantenido en los detalles, recurriendo a la cabecera actual cuando falte. Hecho significa que una llamada que lleva description renderiza esa etiqueta y una sin ella renderiza exactamente como antes; revisa las pruebas existentes de shell tool para las aserciones del resumen.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Clojure
Estrellas
1k
Forks
82
Merge medio
1 d 20 h
PR fusionados (30 d)
22

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de editor-code-assistant/eca

Todos los issues de editor-code-assistant/eca

Issues similares

Más issues de Clojure

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.