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

Aperta Adatta ai principianti
#68,298 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Leggi packages/core/src/plugin/goal.ts intorno alle righe 411–418, dove il plugin goal assegna l’obiettivo troncato come titolo della sessione. Segui il modo in cui i normali primi messaggi dell’utente attivano SessionTitle.generate e confrontalo con l’avvio sintetico di goal. Aggiorna la gestione del titolo in modo che una prima sessione /goal riceva un titolo riassuntivo generato. Poi verifica che la barra laterale o l’intestazione non mostrino più l’obiettivo troncato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
230k
Fork
31.3k
Merge medio
5h 44m
PR unite (30g)
529

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.