openclaw/src/config/sessions
Xinhua Gu 90774c098a fix(sessions): allow cross-agent session file paths in multi-agent setups
When OPENCLAW_STATE_DIR changes between session creation and resolution
(e.g., after reinstall or config change), absolute session file paths
pointing to other agents' sessions directories were rejected even though
they structurally match the valid .../agents/<agentId>/sessions/... pattern.

The existing fallback logic in resolvePathWithinSessionsDir extracts the
agent ID from the path and tries to resolve it via the current env's
state directory. When those directories differ, the containment check
fails. Now, if the path structurally matches the agent sessions pattern
(validated by extractAgentIdFromAbsoluteSessionPath), we accept it
directly as a final fallback.

Fixes #15410, Fixes #15565, Fixes #15468
2026-02-17 00:00:54 +01:00
..
delivery-info.ts fix: defer gateway restart until all replies are sent (#12970) 2026-02-14 00:29:29 +01:00
group.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
main-session.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
metadata.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
paths.ts fix(sessions): allow cross-agent session file paths in multi-agent setups 2026-02-17 00:00:54 +01:00
reset.ts refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
session-key.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
sessions.test.ts fix(security): create session transcript files with 0o600 permissions (#18066) 2026-02-16 08:33:40 -05:00
store.pruning.e2e.test.ts fix(sessions): archive transcript files when pruning stale entries 2026-02-16 23:50:56 +01:00
store.pruning.test.ts test: remove low-value stale-prune no-updatedAt edge case 2026-02-16 09:02:08 +00:00
store.ts fix: atomic session store writes to prevent context loss on Windows 2026-02-16 23:57:21 +01:00
transcript.ts fix(security): create session transcript files with 0o600 permissions (#18066) 2026-02-16 08:33:40 -05:00
types.ts Agents: raise bootstrap total cap and warn on /context truncation (#18229) 2026-02-16 12:04:53 -05:00