Problem
Bare /resume and /sessions only inspect .graff/sessions relative to the process cwd. When the current folder has no saves, /resume reports:
(no saved sessions in cwd — /save creates one)
This makes valid sessions elsewhere on the same device undiscoverable and looks like data loss. It is especially confusing for users who previously launched graff from $HOME: those saves remain under ~/.graff/sessions, but starting graff inside a repository hides all of them.
This is distinct from #109, which improved labels for sessions that are already in the current picker.
Reproduction
- From
$HOME, start graff, create a conversation, and /save home-test.
- Confirm
~/.graff/sessions/home-test.session.json exists.
mkdir /tmp/empty-project && cd /tmp/empty-project.
- Start
graff and run bare /resume (or /sessions).
- The picker says there are no saved sessions in cwd and provides no route to the existing
home-test save.
Observed on macOS arm64 with graff 0.0.282. On the affected machine, 45 *.session.json files existed under ~/.graff/sessions while the new project had none at the time of the diagnostic.
Current implementation
src/session_index.zig defines sessions_dir = ".graff/sessions" and opens it through Io.Dir.cwd().
src/commands_resume.zig turns an empty cwd-local list into the “no saved sessions in cwd” diagnostic.
- Existing saved files do not persist an originating cwd, so the UI cannot currently explain where older saves came from.
This appears to be longstanding cwd-scoped behavior rather than a new 0.0.282 deletion/regression, but the resulting UX is a harness-level discoverability limitation.
Expected behavior
Provide a device-wide discovery path while preserving workspace safety. Any of these would address the core issue:
- Make bare
/resume include device-wide saves, grouped/labeled by originating workspace; or
- Add an explicit
/resume --all / /sessions --all, and mention it in the empty-cwd diagnostic; or
- Maintain a device-level index that points to cwd-local session files.
Cross-workspace results should show the saved session title, session key, and originating cwd. Resuming one should clearly switch/confirm the workspace or explicitly state that it will restore conversation history into the current cwd, so tools are not silently run against the wrong project.
For legacy saves without cwd metadata (including saves under ~/.graff/sessions), provide a compatible fallback rather than leaving them invisible.
Acceptance criteria
- A user in a new/empty cwd can discover existing sessions elsewhere on the same device.
- The empty-cwd message points to the device-wide discovery command/path if cwd-local scope remains the default.
- Cross-workspace entries identify their originating directory and do not silently bind tools to the wrong workspace.
- Existing cwd-local resume behavior and old saved-session files remain compatible.
Problem
Bare
/resumeand/sessionsonly inspect.graff/sessionsrelative to the process cwd. When the current folder has no saves,/resumereports:This makes valid sessions elsewhere on the same device undiscoverable and looks like data loss. It is especially confusing for users who previously launched
grafffrom$HOME: those saves remain under~/.graff/sessions, but startinggraffinside a repository hides all of them.This is distinct from #109, which improved labels for sessions that are already in the current picker.
Reproduction
$HOME, startgraff, create a conversation, and/save home-test.~/.graff/sessions/home-test.session.jsonexists.mkdir /tmp/empty-project && cd /tmp/empty-project.graffand run bare/resume(or/sessions).home-testsave.Observed on macOS arm64 with
graff 0.0.282. On the affected machine, 45*.session.jsonfiles existed under~/.graff/sessionswhile the new project had none at the time of the diagnostic.Current implementation
src/session_index.zigdefinessessions_dir = ".graff/sessions"and opens it throughIo.Dir.cwd().src/commands_resume.zigturns an empty cwd-local list into the “no saved sessions in cwd” diagnostic.This appears to be longstanding cwd-scoped behavior rather than a new 0.0.282 deletion/regression, but the resulting UX is a harness-level discoverability limitation.
Expected behavior
Provide a device-wide discovery path while preserving workspace safety. Any of these would address the core issue:
/resumeinclude device-wide saves, grouped/labeled by originating workspace; or/resume --all//sessions --all, and mention it in the empty-cwd diagnostic; orCross-workspace results should show the saved session title, session key, and originating cwd. Resuming one should clearly switch/confirm the workspace or explicitly state that it will restore conversation history into the current cwd, so tools are not silently run against the wrong project.
For legacy saves without cwd metadata (including saves under
~/.graff/sessions), provide a compatible fallback rather than leaving them invisible.Acceptance criteria