Return Desk resume selection
Maya remembers the topic, but the newest file is not necessarily the conversation she wants.
The safest approach is to name the intended identity or known file, then inspect the resulting session before asking it to do more work.
Milestone: Open the known copied journal
Need. Return to yesterday’s labels, not today’s unrelated packaging note.
Obstacle. A recent-session list answers a recency question. Maya has an identity question.
Print the exact command from the receipt:
Terminal shell — print the generated native command:
jq -r '.commands.resumeExplicitPath' "$RECEIPT"
Read, copy, and run the complete printed command in the same terminal. Printing it alone is not the exercise.
If startup succeeds, remain idle and inspect the session.
Human OMP slash commands — inside the isolated lab, one at a time:
/session info
/dirs
The supplied TUI session-info implementation displays a file and an ID. /dirs lists the manager’s working directory and additional roots.
Check that:
- The displayed session file is the receipt’s
yesterdayfile. - The conversation contains the two fictional Lantern Board messages.
- The working directory is the copied project, not
/fictional/lantern-board. - The workspace remains the current workspace.
Use the saved header’s type: "session" record as the durable identity reference. Modern journals may have a title slot before that record, so selecting by type is safer than assuming the first physical line is always the header.
Do not assume that every field named sessionId in every surface means persistent journal identity. In the supplied implementation, AgentSession.sessionId is provider-facing; the distinction becomes important after /fresh.
What changes? A native process opens the selected saved conversation and rebuilds runtime context.
What does not change? It is not implicitly forked, and workspace files are not restored.
Expected observation. The copied journal has persistent identity 11111111-1111-4111-8111-111111111111.
Recorded check. The separate source-CLI resume check returned that identity, the intended journal, two messages, the copied project cwd, and unchanged workspace bytes. It exited successfully after read-only inspection.
Failure and recovery. Stop on setup, unexpected identity, unexpected cwd, or a persistence error. Do not send a prompt to ask the model whether the switch worked. A model’s answer would be weaker evidence than the session file and scope.
Self-check. Why inspect both identity and cwd?
Answer: The right conversation in the wrong project scope is still unsafe to continue.
Milestone: Inspect and cancel the in-session picker
Need. Maya wants to look for another history without committing to a switch.
Obstacle. Opening a selector and selecting a session are different actions.
Human OMP slash command — inside the idle fictional session:
/resume
The native picker begins in current-folder scope.
- Tab toggles between current-folder and all-projects scope.
- Enter selects the highlighted native session.
- Escape cancels the picker and returns to the current session.
All-projects data is loaded lazily and cached for that picker. Reopen the picker if you need a refreshed listing after histories change elsewhere.
“Current folder” is a session-listing scope, not a filesystem permission boundary. With a custom session directory, the list is drawn from that directory. “All projects” searches the native global store; it is not a disk-wide search of arbitrary custom folders, backups, or every nested artifact.
The lab’s explicit session directory is separate from ordinary managed global buckets. An empty all-projects view in this lab does not mean the current-folder fixtures disappeared.
For this milestone, cancel with Escape. Then inspect session information and directories again.
What changes? The selector’s scope and presentation can change.
What does not change on cancellation? No selected target replaces the active conversation.
Recorded check. Actual SessionSelectorComponent key handling and an inert controller host confirmed cancellation, current-folder startup, Tab use of preloaded global data, and delivery of the selected record on Enter. Physical terminal rendering was not tested.
Failure and recovery. If global loading fails, remain in the current session and retry the picker later. Do not interpret an empty search result as deletion. Titles, previews, and status labels are navigation aids, not a complete journal audit.
Self-check. Does pressing Tab authorize switching to another project?
Answer: No. It changes the search scope. Selection is a separate action.
Milestone: Resolve a known identity deliberately
The slash command can resolve a native session identity or filename prefix directly.
Human OMP slash command — inside the idle fictional session:
/resume 11111111-1111-4111-8111-111111111111
The current slash implementation searches locally first, then explicitly allows global fallback—even when the active manager has a custom session directory.
It does not have the terminal command’s direct filesystem-path branch. Do not treat a slash argument containing a JSONL path as equivalent to terminal --resume.
The resolver accepts case-insensitive prefixes of:
- The session ID.
- The filename stem.
- The ID portion after the timestamp separator in the filename.
It takes the first matching record, not a guaranteed unique match. Prefer a full known identity over a short ambiguous prefix.
What changes? A successful lookup switches or reloads the matched conversation.
What does not change? It does not create a fork or restore workspace files. A same-file reload can still rebuild runtime context.
Recorded check. local-global-prefix-and-unknown confirmed local-first resolution, case-insensitive identity matching, filename matching, interactive global fallback, and startup-directory confinement.
Failure and recovery. An unknown slash identity reports not found. Do not silently pick a different conversation. Verify the target against the supplied header or reopen the picker.
Self-check. Is a very short prefix safer because it is easier to type?
Answer: No. Convenience does not establish uniqueness.
Terminal resume is a different surface
The following table is a non-runnable syntax reference, not a record of execution:
| Surface | Syntax | Meaning |
|---|---|---|
| Human, inside OMP | /resume | Open the in-session picker. |
| Human, inside OMP | /resume <id-prefix> | Resolve a native identity/filename prefix, local first with global fallback. |
| Terminal | omp --resume | Open the startup picker. |
| Terminal | omp --resume <id-or-path> | Resolve an identity or directly open a path-like value. |
| Terminal | omp --session-dir <directory> --resume <id-prefix> | Confine startup identifier lookup to that directory. |
The startup restriction applies to identifier lookup. It is not a general prohibition on direct paths or the picker’s all-projects scope. The environment’s PI_CODING_AGENT_SESSION_DIR can also supply an explicit startup directory.
A path-like terminal value contains / or \, or ends in .jsonl. It goes directly to SessionManager.open.
Important path trap: an unknown identifier and a missing explicit file are not equivalent. The supplied open/set-file implementation can treat an empty or missing explicit path as a fresh session and materialize a header there. Do not use a typoed path as a guaranteed “not found” test.
Milestone: Cancel startup and test an unknown identity
Exit the fictional session normally:
Human OMP slash command — inside the lab:
/exit
Print the startup picker command, then run the whole printed command.
Terminal shell — print the generated startup picker command:
jq -r '.commands.resumePicker' "$RECEIPT"
Cancel that picker with Escape.
Unlike in-session cancellation, this cancels startup rather than returning to an already active conversation. The source-backed exit text is No session selected. If both the current-folder and global listings are empty, startup instead reports No sessions found.
An empty current-folder list does not automatically switch the picker to all projects. Startup may preload the global list, but the scope switch remains deliberate.
Next, print and run the generated unknown-identity command:
Terminal shell — print the generated unknown-target command:
jq -r '.commands.unknownIdentity' "$RECEIPT"
Expected observation. The native target not-a-fictional-session fails identifier resolution rather than silently selecting another history.
What changes? A startup attempt begins and then exits or fails. There is no successful conversation selection in either exercise.
What does not follow? Do not infer that every piece of startup bookkeeping, including breadcrumbs, must remain untouched. Re-establish the intended conversation before the continuation exercise.
Recorded boundary. Picker component cancellation and manager-level unknown-ID behavior were checked. Physical startup picker cancellation and its terminal exit text remain source-backed rather than physically observed.
Self-check. Which cancellation keeps a running conversation available: in-session /resume, or terminal --resume?
Answer: In-session picker cancellation.
Source anchors: packages/coding-agent/src/slash-commands/builtin-lifecycle.ts — resume and dirs entries; packages/coding-agent/src/session/session-listing.ts — sessionMatchesResumeArg, resolveResumableSession; packages/coding-agent/src/main.ts — createSessionManager, runRootCommand; packages/coding-agent/src/modes/components/session-selector.ts — SessionSelectorComponent; packages/coding-agent/src/modes/controllers/selector-controller.ts — showSessionSelector, handleResumeSession.
Sessions, resets, and reviewable history · Source chapter: continuity/return-desk-resume-selection. Original evidence remains scoped to its recorded snapshot.