Skip to content

feat: group sessions by project directory like Claude Code - #17

Merged
qiankunli merged 1 commit into
mainfrom
feat/project-scoped-sessions
Jul 10, 2026
Merged

feat: group sessions by project directory like Claude Code#17
qiankunli merged 1 commit into
mainfrom
feat/project-scoped-sessions

Conversation

@qiankunli

Copy link
Copy Markdown
Collaborator

Store layout moves from ~/.baton/sessions// to
~/.baton/projects///, using the same munging rule as
Claude Code (non-alphanumeric chars replaced with '-').

  • createSession writes into the per-project subdirectory
  • openSession(id) scans across projects (@ mentions can reference any
    project's session, so cwd is not required to open by id)
  • listSessions({cwd}) goes straight to the matching project dir but
    keeps the exact meta.cwd filter, since munging is lossy and distinct
    cwds can collide on the same directory name
  • legacy sessions/ layout is migrated once on first store access, based
    on each session's meta.cwd; corrupt metas stay in place, and the
    legacy dir is removed once emptied
  • docs/design.md data-directory section updated accordingly

Store layout moves from ~/.baton/sessions/<id>/ to
~/.baton/projects/<munged-cwd>/<id>/, using the same munging rule as
Claude Code (non-alphanumeric chars replaced with '-').

- createSession writes into the per-project subdirectory
- openSession(id) scans across projects (@ mentions can reference any
  project's session, so cwd is not required to open by id)
- listSessions({cwd}) goes straight to the matching project dir but
  keeps the exact meta.cwd filter, since munging is lossy and distinct
  cwds can collide on the same directory name
- legacy sessions/ layout is migrated once on first store access, based
  on each session's meta.cwd; corrupt metas stay in place, and the
  legacy dir is removed once emptied
- docs/design.md data-directory section updated accordingly
@qiankunli
qiankunli merged commit 4883596 into main Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants