Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔨 chore: persist `ccSessionId` in topic metadata for CC multi-turn resume (#13902)

Arvin Xu91428ea0d247
diff --git a/packages/types/src/topic/topic.ts b/packages/types/src/topic/topic.ts
index 56d939e4520..54bc5d70ebe 100644
--- a/packages/types/src/topic/topic.ts
+++ b/packages/types/src/topic/topic.ts
@@ -43,6 +43,12 @@ export interface ChatTopicBotContext {
export interface ChatTopicMetadata {
bot?: ChatTopicBotContext;
boundDeviceId?: string;
+ /**
+ * CC session ID for multi-turn resume (desktop only).
+ * Persisted after each CC execution so the next message in the same topic
+ * can use `--resume <sessionId>` to continue the conversation.
+ */
+ ccSessionId?: string;
/**
* Cron job ID that triggered this topic creation (if created by scheduled task)
*/
diff --git a/src/server/routers/lambda/topic.ts b/src/server/routers/lambda/topic.ts
index 90b35b22427..5dbe343ec69 100644
--- a/src/server/routers/lambda/topic.ts
+++ b/src/server/routers/lambda/topic.ts
@@ -557,6 +557,7 @@ export const topicRouter = router({
id: z.string(),
metadata: z.object({
boundDeviceId: z.string().optional(),
+ ccSessionId: z.string().optional(),
model: z.string().optional(),
provider: z.string().optional(),
runningOperation: z