diff --git a/docs/session-switching-and-recent-listing.md b/docs/session-switching-and-recent-listing.md index a13e883b9..e99b40918 100644 --- a/docs/session-switching-and-recent-listing.md +++ b/docs/session-switching-and-recent-listing.md @@ -24,9 +24,9 @@ It focuses on current implementation behavior, including fallback paths and cave `SessionManager` stores file sessions under a canonical-cwd bucket by default: -- `~/.omp/agent/sessions/--/*.jsonl` +- `~/.omp/agent/sessions//*.jsonl` -`scope` is `home`, `tmp`, or `abs`. Legacy relative/absolute bucket names are migrated best-effort. `SessionManager.list(cwd, sessionDir?)` reads only the resolved bucket unless an explicit `sessionDir` is provided. +`` is the path-encoded canonical cwd (`-` under home, `-tmp-` under the temp root, `----` otherwise; see [session.md](session.md#on-disk-layout)). Buckets from the reverted 17.2.5-17.2.8 hashed scheme are migrated best-effort. `SessionManager.list(cwd, sessionDir?)` reads only the resolved bucket unless an explicit `sessionDir` is provided. ### Two listing paths with different payloads diff --git a/docs/session.md b/docs/session.md index fcc6d350b..4ece6c459 100644 --- a/docs/session.md +++ b/docs/session.md @@ -37,12 +37,12 @@ Does not cover `/tree` UI rendering behavior beyond semantics that affect sessio Default file-session location: ```text -~/.omp/agent/sessions/--/_.jsonl +~/.omp/agent/sessions//_.jsonl ``` -`` is `home`, `tmp`, or `abs`, chosen after canonicalizing cwd (so symlink aliases share a bucket). The readable basename is sanitized and capped at 80 characters; the full canonical cwd digest prevents the collisions possible with the old separator-replacement scheme. +`` is derived from the canonicalized cwd (so symlink aliases share a bucket): `-` for directories under home, `-tmp-` for directories under the temp root, and `----` for anything else, with path separators replaced by `-`. -On access, the old home-relative (`-`), temp-relative (`-tmp-`), and absolute (`----`) buckets are migrated into the hashed bucket best-effort. Colliding legacy buckets are split by the cwd recorded in each session header before migration. +On access, buckets written by the short-lived hashed scheme (`--`, used in 17.2.5-17.2.8 and reverted in 17.2.9 by #7397) are migrated back into the path-encoded names best-effort, along with older `---*--` spellings of home-relative buckets. Blob store location: