## Return Desk missing\-directory decisions

A saved conversation can outlive the project directory recorded in its header\.

That is not merely another search failure\.&#32;It raises a new question\:&#32;**where should this conversation be rooted now\?**

### Milestone\:&#32;Choose relocation or fallback consciously

**Need\.**&#32;Maya finds the right journal\,&#32;but its recorded project directory is gone\.

**Obstacle\.**&#32;Different entry paths do not ask the same question or perform the same relocation\.

This is a decision exercise\.&#32;Do not delete a directory to manufacture it\.

**Exact action\:**&#32;identify which entry path you are using\,&#32;then apply the matching row below\.&#32;For an ID\-based relocation prompt\,&#32;choose Yes only when the launch directory is the intended replacement project\.

| Entry path and condition | Current behavior | What to inspect afterward |
| --- | --- | --- |
| Startup&#32;`--resume <id>`\;&#32;recorded cwd still exists | Open the matched journal\.&#32;Startup adopts the resumed project scope and reloads cwd\-scoped settings\/caches\. | Identity\,&#32;journal file\,&#32;active directories\,&#32;applicable project settings\. |
| Startup&#32;`--resume <id>`\;&#32;recorded cwd is gone\;&#32;Yes or default answer | Re\-root that same session into the launch directory\.&#32;The journal and its artifact namespace are relocated\,&#32;not duplicated as a fork\. | Same persistent ID\;&#32;new journal location\;&#32;updated header cwd\. |
| Same ID lookup\;&#32;No | Cancel startup rather than fall through to a new conversation\. | No successful resume\;&#32;original journal remains available\. |
| Same ID lookup\;&#32;consent unavailable without a TTY | Fail with an instruction to run interactively\. | No assumed relocation\. |
| Startup&#32;`--resume <path.jsonl>`\;&#32;recorded cwd is gone | Direct opening bypasses the ID relocation prompt\.&#32;Active cwd falls back to the launch project without relocating the journal\. | Same journal location\;&#32;active cwd may differ from the retained recorded header cwd\. |
| Runtime session\-file switch\;&#32;recorded cwd is gone | Keep the current active project instead of changing into a nonexistent directory\. | Target identity\,&#32;unchanged active cwd\,&#32;original journal location\. |
| Startup picker selects a session with missing cwd | Its direct\-open path does not provide the ID\-lookup relocation consent flow\. | Launch\-cwd fallback and journal location\,&#32;rather than assumed relocation\. |
| `--continue`\;&#32;breadcrumb’s source project is gone and destination lacks its own history | Can automatically re\-root the same session into the destination\. | Same identity\,&#32;relocated journal\,&#32;destination cwd\. |
| `--continue`\;&#32;destination has its own applicable history | Prefer destination history rather than automatically adopting the vanished project’s session\. | Which identity actually won\. |

For the ID prompt\,&#32;an empty answer means acceptance in the supplied source\.&#32;Declining produces the source\-backed startup message&#32;`Resume cancelled: session was not moved.`

### What re\-rooting does not repair

Re\-rooting concerns the journal\/artifact namespace and the session’s cwd\.&#32;It does not\:

- Restore a missing repository\.
- Move or reconstruct the old workspace files\.
- Make old tool results accurate for the new directory\.
- Prove that the destination’s instructions are compatible with the old task\.
- Rewrite every historical path inside conversation content\.

A successful cross\-project resume can also change which project settings and instructions apply\.&#32;That is why cwd belongs in the ledger rather than in a footnote\.

**Recorded checks\.**&#32;Injected acceptance moved the same identity\;&#32;decline returned no manager\;&#32;unavailable consent raised the interactive\-use instruction\.&#32;Direct\-path opening retained the journal location and used launch\-cwd fallback\.&#32;Controller checks also confirmed missing\-cwd fallback and settings\-save failure before switching\.

Those answers were injected into the existing prompt seam\,&#32;not typed into a physical readline prompt\.

**Failure and recovery\.**&#32;If relocation or cwd re\-scoping fails\,&#32;stop before further work\.&#32;Inspect identity\,&#32;current journal location\,&#32;and active directories\.&#32;The supplied code includes relocation and rollback handling\,&#32;but the evidence does not establish an all\-filesystem\,&#32;all\-failure atomicity guarantee\.

**Self\-check\.**&#32;Maya opened a direct JSONL path\,&#32;and the active cwd is now the launch directory\.&#32;Has the journal necessarily moved\?

**Answer\:**&#32;No\.&#32;Direct\-path fallback and ID\-based re\-rooting are different operations\.

**Source anchors\:**&#32;`packages/coding-agent/src/main.ts`&#32;—&#32;`promptMoveSession`\,&#32;`moveMissingCwdSessionIfNeeded`\,&#32;`switchToResumedProject`\;&#32;`packages/coding-agent/src/session/session-manager.ts`&#32;—&#32;`open`\,&#32;`setSessionFile`\,&#32;`moveTo`\,&#32;`continueRecent`\;&#32;`packages/coding-agent/src/config/settings.ts`&#32;—&#32;`reloadForCwd`\.
