mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-05 08:54:44 +02:00
fix: preserve CLI session ID in text output mode
When the CLI backend output mode is "text", sessionId was hardcoded to undefined. This caused the fallback chain to store the OpenClaw internal UUID as the CLI session ID. On resume, --resume was called with the wrong UUID, resulting in "No conversation found with session ID". Return resolvedSessionId instead of undefined so the correct CLI session ID is persisted and resume works correctly.
This commit is contained in:
committed by
Peter Steinberger
parent
9f8c4efa9b
commit
7c8d75e3d6
@@ -422,7 +422,7 @@ export async function runCliAgent(params: {
|
||||
const outputMode = useResume ? (backend.resumeOutput ?? backend.output) : backend.output;
|
||||
|
||||
if (outputMode === "text") {
|
||||
return { text: stdout, sessionId: undefined };
|
||||
return { text: stdout, sessionId: resolvedSessionId };
|
||||
}
|
||||
if (outputMode === "jsonl") {
|
||||
const parsed = parseCliJsonl(stdout, backend);
|
||||
|
||||
Reference in New Issue
Block a user