summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorQunhong Zeng <[email protected]>2026-01-16 05:24:13 +0800
committerGitHub <[email protected]>2026-01-15 15:24:13 -0600
commitb14622352e542147e5864ff3b6b092b6e5b4d309 (patch)
tree527c1e322ba93f222276f0167bdafc578d0a9afe
parentea643f1e3f6c1a7459d184cb99a5b24adceb8a6e (diff)
downloadopencode-b14622352e542147e5864ff3b6b092b6e5b4d309.tar.gz
opencode-b14622352e542147e5864ff3b6b092b6e5b4d309.zip
fix(session): ensure agent exists before processing title in session summary (#8662)
-rw-r--r--packages/opencode/src/session/summary.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/opencode/src/session/summary.ts b/packages/opencode/src/session/summary.ts
index 2bd1b0da6..dbca218f9 100644
--- a/packages/opencode/src/session/summary.ts
+++ b/packages/opencode/src/session/summary.ts
@@ -77,6 +77,7 @@ export namespace SessionSummary {
const textPart = msgWithParts.parts.find((p) => p.type === "text" && !p.synthetic) as MessageV2.TextPart
if (textPart && !userMsg.summary?.title) {
const agent = await Agent.get("title")
+ if (!agent) return
const stream = await LLM.stream({
agent,
user: userMsg,