goal: session started with /goal gets a truncated objective as its title, not a generated title
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读 packages/core/src/plugin/goal.ts 第411–418行附近的代码,了解 goal 插件在何处将截断后的目标指定为会话标题。追踪普通的首条用户提示如何触发 SessionTitle.generate,并将其与合成的 goal 启动流程进行比较。更新标题处理逻辑,使首次 /goal 会话获得生成的摘要标题。然后验证侧边栏或页眉不再显示截断后的目标。
由索引模型根据 Issue 内容生成。
描述
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-searchconfigured)
Reproduction
- Open OpenCode Desktop and create a new session.
- As the very first input, run
/goal <objective>with any objective, e.g./goal Ship the release and update the changelog. - 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 分钟
- 30 天内合并 PR
- 529
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/desktop type/feature version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#68437 · 1 条评论 ·
维护者通常 1 天内回复
-
cli: opencode models <provider> filter from v1 is rejected in v2 ("Unexpected positional argument")可能已有人在做 @nilparra-dev 今天认领。 未关闭area/cli platform/macos type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#68364 · 2 条评论 ·
维护者通常 1 天内回复
-
area/tui platform/linux type/feature version/v2
难度 2/5 1-3 小时 新手友好度 66/100
anomalyco/opencode#68301 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Web UI: Pressing Ctrl+<key> with Caps Lock active triggers Ctrl+Shift+<key> shortcuts可能已有人在做 @saurabhbhoir456 今天认领。 未关闭area/web platform/windows type/bug version/v2
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#68237 · 6 条评论 ·
维护者通常 1 天内回复
-
area/desktop inference/go platform/macos type/bug version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#68121 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
amosblomqvist/learnharness#1141 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
ranxianglei/billion-context#8319 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
tencent-connect/dsh-qqbot#148 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JimLiu/open-artifact#126 ·
-
难度 2/5 1-3 小时 新手友好度 78/100