mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 02:40:18 +00:00
fix(sessions): create transcript file on chat.inject when missing (#36645)
`chat.inject` called `appendAssistantTranscriptMessage` with `createIfMissing: false`, causing a hard error when the transcript file did not exist on disk despite having a valid `transcriptPath` in session metadata. This commonly happens with ACP oneshot/run sessions where the session entry is created but the transcript file is not yet materialized. The fix is a one-character change: `createIfMissing: true`. The `ensureTranscriptFile` helper already handles directory creation and file initialization safely. Fixes #36170 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1471,7 +1471,7 @@ export const chatHandlers: GatewayRequestHandlers = {
|
|||||||
storePath,
|
storePath,
|
||||||
sessionFile: entry?.sessionFile,
|
sessionFile: entry?.sessionFile,
|
||||||
agentId: resolveSessionAgentId({ sessionKey: rawSessionKey, config: cfg }),
|
agentId: resolveSessionAgentId({ sessionKey: rawSessionKey, config: cfg }),
|
||||||
createIfMissing: false,
|
createIfMissing: true,
|
||||||
});
|
});
|
||||||
if (!appended.ok || !appended.messageId || !appended.message) {
|
if (!appended.ok || !appended.messageId || !appended.message) {
|
||||||
respond(
|
respond(
|
||||||
|
|||||||
Reference in New Issue
Block a user