diff --git a/CHANGELOG.md b/CHANGELOG.md index d5942073139..72a97a7c8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Docs: https://docs.openclaw.ai ### Fixes - Agents: revert accidental per-model thinkingDefault override merge. (#19195) Thanks @sebslight. +- Sessions: revert accidental session transcript permission hardening from PR #18288. (#19224) Thanks @sebslight. - Voice call/Gateway: prevent overlapping closed-loop turn races with per-call turn locking, route transcript dedupe via source-aware fingerprints with strict cache eviction bounds, and harden `voicecall latency` stats for large logs without spread-operator stack overflow. (#19140) Thanks @mbelinky. - iOS/Onboarding: stop auth Step 3 retry-loop churn by pausing reconnect attempts on unauthorized/missing-token gateway errors and keeping auth/pairing issue state sticky during manual retry. (#19153) Thanks @mbelinky. - Fix types in all tests. Typecheck the whole repository. diff --git a/src/agents/pi-embedded-runner/session-manager-init.ts b/src/agents/pi-embedded-runner/session-manager-init.ts index ef795718320..95c699947bd 100644 --- a/src/agents/pi-embedded-runner/session-manager-init.ts +++ b/src/agents/pi-embedded-runner/session-manager-init.ts @@ -43,7 +43,7 @@ export async function prepareSessionManagerForRun(params: { if (params.hadSessionFile && header && !hasAssistant) { // Reset file so the first assistant flush includes header+user+assistant in order. - await fs.writeFile(params.sessionFile, "", { encoding: "utf-8", mode: 0o600 }); + await fs.writeFile(params.sessionFile, "", "utf-8"); sm.fileEntries = [header]; sm.byId?.clear?.(); sm.labelsById?.clear?.(); diff --git a/src/auto-reply/reply/session.ts b/src/auto-reply/reply/session.ts index f03de1c3161..cd0ccf75bd8 100644 --- a/src/auto-reply/reply/session.ts +++ b/src/auto-reply/reply/session.ts @@ -89,10 +89,7 @@ function forkSessionFromParent(params: { cwd: manager.getCwd(), parentSession: parentSessionFile, }; - fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, { - encoding: "utf-8", - mode: 0o600, - }); + fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8"); return { sessionId, sessionFile }; } catch { return null; diff --git a/src/gateway/server-methods/sessions.ts b/src/gateway/server-methods/sessions.ts index ab37ff7bc49..ffe69ba88f4 100644 --- a/src/gateway/server-methods/sessions.ts +++ b/src/gateway/server-methods/sessions.ts @@ -471,10 +471,7 @@ export const sessionsHandlers: GatewayRequestHandlers = { const archived = archiveFileOnDisk(filePath, "bak"); const keptLines = lines.slice(-maxLines); - fs.writeFileSync(filePath, `${keptLines.join("\n")}\n`, { - encoding: "utf-8", - mode: 0o600, - }); + fs.writeFileSync(filePath, `${keptLines.join("\n")}\n`, "utf-8"); await updateSessionStore(storePath, (store) => { const entryKey = compactTarget.primaryKey;