Open caller-supplied content through the shared document renderer without depending on inline diagram visualization. Keep checkpoint reads tied to their optional preview-service activation and cover cancellation in both the service and the chat row.
The sandbox policy derived a linked checkout's shared Git directory from its
`.git` pointer and granted it. That put Git worktree knowledge and a
worktree-only entry (`prepare`) into a generic service. The policy now bounds
a Session by its directory and adds only configured directories and those a
Host plugin registered through `registerWritableRoot`; relative to the lower
branch its source changes in one place, the root it reads.
- `prepare`, the derivation state, its three listeners, and
`src/linked-checkout.ts` are removed.
- The worktree service creates under the Session's policy as on the lower
branch; removal and restoration swap the root for the source checkout. The
forge panel's blocker reads the Session's root alone.
- A Session that works in a linked worktree cannot write the repository's Git
directory under workspace-write without a grant. Tests pin the denial and
that a registered grant admits creation, restoration, and a commit.
Granting the Git directory of the checkout a Session works in is left to a
separate plugin that reads the layout and registers the directory.
The lower branch merged master, which added a fetch of the remote base branch
to worktree creation. On this branch a Session opened in a linked checkout can
create worktrees, and the fetch writes the Git directory that checkout shares
outside its root. The fetch now runs under the policy resolved after
`prepare`, which grants that directory, as the later writes do. A real-sandbox
test fetches from a linked checkout.
The lower branch removed `rootOf` and the `workspaceRoot` projection: a Session
has one directory, read through `ctx.workingDirectory.get`. This merge moves the
consumers of this branch to that read.
- sandbox-policy, workspace-files, and workspace-changes read `get`; the
`recordedRootOf` read is removed. With the working-directory service mounted,
a Session without a header directory is bounded by that service's default
directory.
- The skill catalog, sidebar terminals, project instructions, `@` file
candidates, the LSP workspace, and skill lookup return to the lower branch's
code, which already reads the directory.
- The client helper exports `selectSessionDirectory` and `sessionDirectory`
in place of the `{ root, cwd }` pair; `WorkspaceChangesSummary` keeps `cwd`,
now the directory the turn started in.
- A stored `working-directory/change` inside the project moves the write
boundary and file views with the directory; one outside returns to the project.
master moved the `workingDirectory` projection-key declaration to
`src/types.ts`; this branch's `workspaceRoot` key follows it there. The three
recorded scenarios master added (`session-list-tools`,
`computer-use-cua-driver-mcp-ptc`, `sdk/subagent-dsh-sdk-empty-route`) drop the
removed `working_directory` tool and the delegation `cwd` parameter from their
sidecars.