## Return Desk resume selection

Maya remembers the topic\,&#32;but the newest file is not necessarily the conversation she wants\.

The safest approach is to name the intended identity or known file\,&#32;then inspect the resulting session before asking it to do more work\.

### Milestone\:&#32;Open the known copied journal

**Need\.**&#32;Return to yesterday’s labels\,&#32;not today’s unrelated packaging note\.

**Obstacle\.**&#32;A recent\-session list answers a recency question\.&#32;Maya has an identity question\.

Print the exact command from the receipt\:

**Terminal shell — print the generated native command\:**

~~~sh
jq -r '.commands.resumeExplicitPath' "$RECEIPT"
~~~

Read\,&#32;copy\,&#32;and run the complete printed command in the same terminal\.&#32;Printing it alone is not the exercise\.

If startup succeeds\,&#32;remain idle and inspect the session\.

**Human OMP slash commands — inside the isolated lab\,&#32;one at a time\:**

~~~text
/session info
/dirs
~~~

The supplied TUI session\-info implementation displays a file and an ID\.&#32;`/dirs`&#32;lists the manager’s working directory and additional roots\.

Check that\:

1. The displayed session file is the receipt’s&#32;`yesterday`&#32;file\.
2. The conversation contains the two fictional Lantern Board messages\.
3. The working directory is the copied project\,&#32;not&#32;`/fictional/lantern-board`\.
4. The workspace remains the current workspace\.

Use the saved header’s&#32;`type: "session"`&#32;record as the durable identity reference\.&#32;Modern journals may have a title slot before that record\,&#32;so selecting by type is safer than assuming the first physical line is always the header\.

Do not assume that every field named&#32;`sessionId`&#32;in every surface means persistent journal identity\.&#32;In the supplied implementation\,&#32;`AgentSession.sessionId`&#32;is provider\-facing\;&#32;the distinction becomes important after&#32;`/fresh`\.

**What changes\?**&#32;A native process opens the selected saved conversation and rebuilds runtime context\.

**What does not change\?**&#32;It is not implicitly forked\,&#32;and workspace files are not restored\.

**Expected observation\.**&#32;The copied journal has persistent identity&#32;`11111111-1111-4111-8111-111111111111`\.

**Recorded check\.**&#32;The separate source\-CLI resume check returned that identity\,&#32;the intended journal\,&#32;two messages\,&#32;the copied project cwd\,&#32;and unchanged workspace bytes\.&#32;It exited successfully after read\-only inspection\.

**Failure and recovery\.**&#32;Stop on setup\,&#32;unexpected identity\,&#32;unexpected cwd\,&#32;or a persistence error\.&#32;Do not send a prompt to ask the model whether the switch worked\.&#32;A model’s answer would be weaker evidence than the session file and scope\.

**Self\-check\.**&#32;Why inspect both identity and cwd\?

**Answer\:**&#32;The right conversation in the wrong project scope is still unsafe to continue\.

### Milestone\:&#32;Inspect and cancel the in\-session picker

**Need\.**&#32;Maya wants to look for another history without committing to a switch\.

**Obstacle\.**&#32;Opening a selector and selecting a session are different actions\.

**Human OMP slash command — inside the idle fictional session\:**

~~~text
/resume
~~~

The native picker begins in&#32;**current\-folder**&#32;scope\.

- **Tab**&#32;toggles between current\-folder and all\-projects scope\.
- **Enter**&#32;selects the highlighted native session\.
- **Escape**&#32;cancels the picker and returns to the current session\.

All\-projects data is loaded lazily and cached for that picker\.&#32;Reopen the picker if you need a refreshed listing after histories change elsewhere\.

“Current folder” is a session\-listing scope\,&#32;not a filesystem permission boundary\.&#32;With a custom session directory\,&#32;the list is drawn from that directory\.&#32;“All projects” searches the native global store\;&#32;it is not a disk\-wide search of arbitrary custom folders\,&#32;backups\,&#32;or every nested artifact\.

The lab’s explicit session directory is separate from ordinary managed global buckets\.&#32;An empty all\-projects view in this lab does not mean the current\-folder fixtures disappeared\.

For this milestone\,&#32;cancel with Escape\.&#32;Then inspect session information and directories again\.

**What changes\?**&#32;The selector’s scope and presentation can change\.

**What does not change on cancellation\?**&#32;No selected target replaces the active conversation\.

**Recorded check\.**&#32;Actual&#32;`SessionSelectorComponent`&#32;key handling and an inert controller host confirmed cancellation\,&#32;current\-folder startup\,&#32;Tab use of preloaded global data\,&#32;and delivery of the selected record on Enter\.&#32;Physical terminal rendering was not tested\.

**Failure and recovery\.**&#32;If global loading fails\,&#32;remain in the current session and retry the picker later\.&#32;Do not interpret an empty search result as deletion\.&#32;Titles\,&#32;previews\,&#32;and status labels are navigation aids\,&#32;not a complete journal audit\.

**Self\-check\.**&#32;Does pressing Tab authorize switching to another project\?

**Answer\:**&#32;No\.&#32;It changes the search scope\.&#32;Selection is a separate action\.

### Milestone\:&#32;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\:**

~~~text
/resume 11111111-1111-4111-8111-111111111111
~~~

The current slash implementation searches locally first\,&#32;then explicitly allows global fallback—even when the active manager has a custom session directory\.

It does&#32;**not**&#32;have the terminal command’s direct filesystem\-path branch\.&#32;Do not treat a slash argument containing a JSONL path as equivalent to terminal&#32;`--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&#32;**first matching record**\,&#32;not a guaranteed unique match\.&#32;Prefer a full known identity over a short ambiguous prefix\.

**What changes\?**&#32;A successful lookup switches or reloads the matched conversation\.

**What does not change\?**&#32;It does not create a fork or restore workspace files\.&#32;A same\-file reload can still rebuild runtime context\.

**Recorded check\.**&#32;`local-global-prefix-and-unknown`&#32;confirmed local\-first resolution\,&#32;case\-insensitive identity matching\,&#32;filename matching\,&#32;interactive global fallback\,&#32;and startup\-directory confinement\.

**Failure and recovery\.**&#32;An unknown slash identity reports not found\.&#32;Do not silently pick a different conversation\.&#32;Verify the target against the supplied header or reopen the picker\.

**Self\-check\.**&#32;Is a very short prefix safer because it is easier to type\?

**Answer\:**&#32;No\.&#32;Convenience does not establish uniqueness\.

### Terminal resume is a different surface

The following table is a&#32;**non\-runnable syntax reference**\,&#32;not a record of execution\:

| Surface | Syntax | Meaning |
| --- | --- | --- |
| Human\,&#32;inside OMP | `/resume` | Open the in\-session picker\. |
| Human\,&#32;inside OMP | `/resume <id-prefix>` | Resolve a native identity\/filename prefix\,&#32;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&#32;**identifier lookup**\.&#32;It is not a general prohibition on direct paths or the picker’s all\-projects scope\.&#32;The environment’s&#32;`PI_CODING_AGENT_SESSION_DIR`&#32;can also supply an explicit startup directory\.

A path\-like terminal value contains&#32;`/`&#32;or&#32;`\`\,&#32;or ends in&#32;`.jsonl`\.&#32;It goes directly to&#32;`SessionManager.open`\.

**Important path trap\:**&#32;an unknown identifier and a missing explicit file are not equivalent\.&#32;The supplied open\/set\-file implementation can treat an empty or missing explicit path as a fresh session and materialize a header there\.&#32;Do not use a typoed path as a guaranteed “not found” test\.

### Milestone\:&#32;Cancel startup and test an unknown identity

Exit the fictional session normally\:

**Human OMP slash command — inside the lab\:**

~~~text
/exit
~~~

Print the startup picker command\,&#32;then run the whole printed command\.

**Terminal shell — print the generated startup picker command\:**

~~~sh
jq -r '.commands.resumePicker' "$RECEIPT"
~~~

Cancel that picker with Escape\.

Unlike in\-session cancellation\,&#32;this cancels startup rather than returning to an already active conversation\.&#32;The source\-backed exit text is&#32;`No session selected`\.&#32;If both the current\-folder and global listings are empty\,&#32;startup instead reports&#32;`No sessions found`\.

An empty current\-folder list does not automatically switch the picker to all projects\.&#32;Startup may preload the global list\,&#32;but the scope switch remains deliberate\.

Next\,&#32;print and run the generated unknown\-identity command\:

**Terminal shell — print the generated unknown\-target command\:**

~~~sh
jq -r '.commands.unknownIdentity' "$RECEIPT"
~~~

**Expected observation\.**&#32;The native target&#32;`not-a-fictional-session`&#32;fails identifier resolution rather than silently selecting another history\.

**What changes\?**&#32;A startup attempt begins and then exits or fails\.&#32;There is no successful conversation selection in either exercise\.

**What does not follow\?**&#32;Do not infer that every piece of startup bookkeeping\,&#32;including breadcrumbs\,&#32;must remain untouched\.&#32;Re\-establish the intended conversation before the continuation exercise\.

**Recorded boundary\.**&#32;Picker component cancellation and manager\-level unknown\-ID behavior were checked\.&#32;Physical startup picker cancellation and its terminal exit text remain source\-backed rather than physically observed\.

**Self\-check\.**&#32;Which cancellation keeps a running conversation available\:&#32;in\-session&#32;`/resume`\,&#32;or terminal&#32;`--resume`\?

**Answer\:**&#32;In\-session picker cancellation\.

**Source anchors\:**&#32;`packages/coding-agent/src/slash-commands/builtin-lifecycle.ts`&#32;—&#32;`resume`&#32;and&#32;`dirs`&#32;entries\;&#32;`packages/coding-agent/src/session/session-listing.ts`&#32;—&#32;`sessionMatchesResumeArg`\,&#32;`resolveResumableSession`\;&#32;`packages/coding-agent/src/main.ts`&#32;—&#32;`createSessionManager`\,&#32;`runRootCommand`\;&#32;`packages/coding-agent/src/modes/components/session-selector.ts`&#32;—&#32;`SessionSelectorComponent`\;&#32;`packages/coding-agent/src/modes/controllers/selector-controller.ts`&#32;—&#32;`showSessionSelector`\,&#32;`handleResumeSession`\.
