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

オープン 初心者向け
#68,298 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

ゴールプラグインが切り詰められた目標をセッションタイトルとして設定する箇所である、packages/core/src/plugin/goal.ts の411〜418行付近を読んでください。通常の最初のユーザープロンプトが SessionTitle.generate を呼び出す仕組みを追い、合成されたゴールの開始処理と比較してください。最初の /goal セッションに生成された要約タイトルが付くよう、タイトル処理を更新してください。その後、サイドバーまたはヘッダーに切り詰められた目標が表示されなくなったことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
230k
フォーク
31.3k
平均マージ
5時間 44分
マージ済み PR(30日)
529

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。