goal: session started with /goal gets a truncated objective as its title, not a generated title

Abierto Apto para principiantes
#68,298 1 comentario 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
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Lee packages/core/src/plugin/goal.ts alrededor de las líneas 411–418, donde el plugin de goal asigna el objetivo truncado como título de la sesión. Sigue cómo los primeros mensajes normales del usuario activan SessionTitle.generate y compáralo con el inicio sintético de goal. Actualiza el manejo del título para que una primera sesión /goal tenga un título de resumen generado. Después, verifica que la barra lateral o el encabezado ya no muestren el objetivo truncado.

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

Descripción

area/plugins platform/windows type/feature version/v2

Summary

Starting a new session with /goal <objective> as the first input gives the session a literal quote of the objective (truncated to 60 characters) instead of a generated title. Because the goal kickoff is stored as a synthetic message rather than a user message, the title agent never names the session.

Environment

  • opencode version: 2.4.4
  • Client: Desktop
  • Model and provider: ollama-cloud/deepseek-v4.1-flash
  • OS: Windows 10.0.19045 (win32 x64)
  • Terminal: Not relevant (Desktop)
  • Shell: Not relevant (Desktop)
  • Install/channel: latest
  • Active plugins: none found (MCP server ollama-web-search configured)

Reproduction

  1. Open OpenCode Desktop and create a new session.
  2. As the very first input, run /goal <objective> with any objective, e.g. /goal Ship the release and update the changelog.
  3. Let the goal kickoff start and look at the session title in the sidebar/header.

Expected Behavior

The session should receive the same short, model-generated summary title it would receive from a normal first user prompt.

Actual Behavior

The title is a literal quote of the /goal objective, truncated to 60 characters with … for longer objectives. It is never regenerated, even after the goal has been running.

Additional Context

Root cause is in packages/core/src/plugin/goal.ts:411-418: when the session still has the root fallback title, the goal plugin explicitly sets title: truncate(text, 60), with the comment that titles come from the first user message and the notice kickoff is not one. Since the kickoff is synthetic, SessionTitle.generate never produces a title from a user message for that session.

Frequency: deterministic; always happens when /goal is the first input.

Related: #61332 mentions the same title side effect while reporting that the goal objective is missing from the timeline; this issue tracks the title behavior itself.

Workaround: rename the session manually, or send a normal message before running /goal.

Lenguaje dominante
TypeScript
Estrellas
230k
Forks
31.3k
Merge medio
5 h 44 min
PR fusionados (30 d)
529

Preparar el entorno

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 anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.