## Decision Desk forking

Eli wants to explore another direction while keeping the original conversation available\.

A fork is useful for that\.&#32;It separates conversation identity and future journal ownership\.&#32;It does not isolate workspace changes\.

### Milestone\:&#32;Fork the current conversation

**Need\.**&#32;Keep the original Lantern Board discussion while creating another conversational starting point\.

**Obstacle\.**&#32;The word “fork” can suggest a Git branch\,&#32;a file snapshot\,&#32;or a previous\-message picker\.&#32;The supplied&#32;`/fork`&#32;does none of those things\.

Use the complete&#32;[Decision Desk recipe](<https://present-sketch-tp94.here.now/examples/decision-desk/commands.txt>)&#32;and its&#32;[state ledger](<https://present-sketch-tp94.here.now/examples/decision-desk/state-ledger.json>)\.

Create a&#32;**new**&#32;disposable lab for this story\.&#32;Preserve the previous receipt separately if you still need it\.

**Terminal shell — Decision Desk preparation\,&#32;from extracted&#32;`examples/`\:**

~~~sh
bun return-desk/lab.ts '{"version":1,"op":"discover"}'
RECEIPT=$(mktemp -t continuity-decision-receipt)
bun return-desk/lab.ts '{"version":1,"op":"act","action":"create"}' | tee "$RECEIPT"
~~~

Stop on&#32;`ok: false`\.&#32;Then retain its paths and the intended executable\:

**Terminal shell — read the successful Decision Desk receipt\:**

~~~sh
LAB=$(jq -r '.root' "$RECEIPT")
SOURCE=$(jq -r '.yesterday' "$RECEIPT")
SESSIONS=$(jq -r '.sessions' "$RECEIPT")
PROJECT=$(jq -r '.cwd' "$RECEIPT")
OMP_BIN=$(command -v omp)
~~~

The same prerequisites and stop rules from&#32;[Return Desk lab setup](<https://present-sketch-tp94.here.now/chapters/continuity-return-desk-lab-setup#continuity-return-desk-lab-setup>)&#32;apply\.

Record the parent and workspace before opening OMP\:

**Terminal shell — read\-only baseline\:**

~~~sh
shasum -a 256 "$SOURCE"
jq -s 'map(select(.type == "session") | {id,parentSession,cwd,title})' "$SOURCE"
cat "$PROJECT/today.txt"
jq -r '.commands.resumeExplicitPath' "$RECEIPT"
~~~

Run the complete printed resume command\.&#32;Stop if it requires model\/auth setup\.&#32;Do not submit a prompt\.

Inside the idle fictional conversation\:

**Human OMP slash command — create the conversational fork\:**

~~~text
/fork
~~~

Then inspect the child\:

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

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

Keep the child active for the reset sequence in the next chapter\.

### The fork ledger

A successful interactive fork has these source\-backed effects\:

| Field | Expected result |
| --- | --- |
| Persistent identity | A new journal ID\. |
| Transcript path | A new JSONL path\. |
| Parent metadata | `parentSession`&#32;records the previous persistent ID\. |
| Title and cwd | Retained from the current session\. |
| Live conversation | Retained\. |
| Ordinary steering\/follow\-up queues | Retained by this fork path\. |
| Journal entries | All existing non\-header entries are carried into the new journal—not only the currently visible messages\. |
| Workspace files | Still the same files in the same workspace\. |
| Session artifacts | Copied recursively where available\,&#32;best\-effort\. |

For this public source\,&#32;the child’s parent ID should be\:

`11111111-1111-4111-8111-111111111111`

The current registry description mentions a fork “from a previous message\.” The implementation route is more specific\:&#32;`handleForkCommand`&#32;calls&#32;`AgentSession.fork()`&#32;immediately\.&#32;**This is a current\-state fork\,&#32;not a previous\-message picker\.**

A copied journal can retain older branches and pre\-clear entries that are not in current model context\.&#32;Forking is therefore not a way to reduce the disclosure content of a later export\.

### Artifacts are not a verified backup

`copySessionArtifacts`&#32;derives the artifact directory by removing&#32;`.jsonl`&#32;from the transcript filename\.

- Missing sources are ignored\.
- Other copy errors are logged rather than thrown from that helper\.
- The fork can therefore exist without every expected artifact having copied\.

That copy does not cover arbitrary workspace files\,&#32;remote copies\,&#32;previously generated exports elsewhere\,&#32;or a guaranteed complete backup of every dependency\.

**Recorded checks\.**&#32;The real SDK\/registry\/controller fork check created a new identity with parent metadata\,&#32;retained messages and ordinary queues\,&#32;preserved parent bytes around the fork call\,&#32;and copied one ordinary artifact\.

The same test then wrote a fictional file in the shared workspace and confirmed that the parent manager saw the changed file at the same cwd\.&#32;The write was a test action\,&#32;not something&#32;`/fork`&#32;performed\.

A separate real&#32;`copySessionArtifacts`&#32;check encountered a regular file blocking the destination directory\.&#32;It returned without throwing and did not copy the artifact\.&#32;That supports the best\-effort warning\;&#32;it is not broad filesystem coverage\.

**Failure and recovery\.**&#32;Interactive&#32;`/fork`&#32;refuses while streaming\.&#32;An in\-memory session cannot fork through this path\.&#32;A before\-switch hook can veto it\.&#32;After any refusal or error\,&#32;inspect the actual file and identity before proceeding\.

**Self\-check\.**&#32;If Eli later changes a workspace file while working in the fork\,&#32;will resuming the parent undo that file change\?

**Answer\:**&#32;No\.&#32;The conversation identities differ\;&#32;the workspace is shared\.

### Interactive and startup forks differ

This is a source\-backed comparison\,&#32;not another executed scenario\:

| Boundary | Interactive&#32;`/fork` | Startup&#32;`--fork` |
| --- | --- | --- |
| Source | Current session | Explicit path or resolved native identity |
| Cwd | Existing active cwd | Launch cwd supplied to startup |
| Conversation | Retains current live messages | Rebuilds from copied journal history |
| Parent\-process queues | Ordinary queues remain on the active fork path | No parent\-process steering\/follow\-up queues are cloned |
| Journal | New identity\;&#32;original retained | New identity\;&#32;source retained |
| Artifacts | Best\-effort copy | Best\-effort copy by default |
| Workspace isolation | None | None |

Full forks may inherit a provider prompt\-cache identity\.&#32;That is separate from journal identity and from provider request identity\.&#32;Changing the startup model\,&#32;thinking\,&#32;prompt\,&#32;or tool shape can suppress automatic inheritance\;&#32;explicit provider\/cache overrides are separate controls\.

You do not need to tune those controls for this workbook\.&#32;The important conclusion is simpler\:&#32;**a new journal is not proof of a cold provider cache\,&#32;and a fork is not&#32;`/fresh`\.**

**Source anchors\:**&#32;`packages/coding-agent/src/slash-commands/builtin-session.ts`&#32;—&#32;`fork`&#32;entry\;&#32;`packages/coding-agent/src/modes/controllers/command-controller.ts`&#32;—&#32;`handleForkCommand`\;&#32;`packages/coding-agent/src/session/agent-session.ts`&#32;—&#32;`fork`\;&#32;`packages/coding-agent/src/session/session-manager.ts`&#32;—&#32;`fork`\,&#32;`forkFrom`\,&#32;`copySessionArtifacts`\;&#32;`packages/coding-agent/src/main.ts`&#32;—&#32;`createSessionManager`\,&#32;`buildSessionOptions`\.
