Linked workspaces

In a workspace, type /add-dir or choose Link a workspace from its menu, then pick another workspace so its agents can read and edit that folder. The link is a chip above the message box, and the other workspace shows who linked it.

Updated

Archive checks whether the worktree can be removed before stopping linked chats, then checks again with new grants blocked. A locked or otherwise ineligible worktree leaves those turns running.

Possible folder grants stay recorded until the agent exits, including while startup or sending a message finishes. Suspending a link changes what a new agent may receive; it does not erase a folder an existing process may still use.

A folder unlinked while an agent prepares to start is removed before that agent receives its folders. This includes changes during environment preparation: Claude and Codex keep the latest linked folders until their startup options are ready, including an empty list when the last folder is unlinked.

Two ways, and they open the same picker:

  • Type /add-dir in the message box and press Enter. A bare / still lists only the agent’s own commands.
  • Right-click the workspace (or use its menu) and choose Link a workspace.

The picker lists workspaces that exist and are not archived, from every repository. Type to filter. It never asks for a path: a link is the workspace you choose, and nothing in a repository, a settings file, an agent’s reply or a link from outside the app can make one.

The linked workspace appears as a chip above the message box. Unlink removes it. If a turn was already sent with that folder, unlink asks “Stop the running turn now, or let it finish with the folder?” Letting it finish keeps the folder until that turn ends, and the chip says it is still available to the running turn, including when that link was the last one. Stopping the turn takes the folder away now, and the chat says a linked folder was taken away. A message you send while that turn is still running is added to the turn and does not take the folder away. A workspace that someone else linked shows a Linked from chip with that workspace’s name.

Type @ in the message box to mention an active linked workspace by name. The reference resolves to its checked folder when you send. A removed, archived or replaced workspace cannot be mentioned until it is available and linked again.

What can the agent do with the folder?

If stopping an agent cannot confirm that every program it started is gone, changing a linked folder is refused and the chat stays recorded as a possible writer. Close that chat and try again; a later confirmed stop releases the folder. This includes a failed Windows process list and an unconfirmed POSIX process-group exit. The existing process-enumeration limits still apply: processes that escaped the group or were never connected by a Windows list cannot be identified. Archiving a workspace with only its own agents keeps its existing stop behavior.

The picker and chip explain edits for the current agent and mode. They use one pinned agent/mode table. Claude’s native decisions are documented by Agent SDK 0.3.319 (Options.permissionMode and Options.additionalDirectories); the scripted CLI tests prescribe whether to ask and verify the app’s card and answer, not Claude’s native decision. Native Claude behavior still needs a real-app check. Claude Code asks in Ask first unless a native rule allows it, edits without asking in Accept edits, and uses its classifier in Auto. Codex edits linked folders without asking in Ask first, Accept edits and Auto. Plan keeps ordinary edits read-only; Bypass permissions asks neither agent. ACP permission requests for linked files ask even in Accept edits, except in Bypass permissions; an ACP agent’s own tools follow its own permissions.

  • Claude Code takes a new folder in a chat that is already running. An idle chat restarts at once without a folder you unlink. A turn that was already sent keeps the folder until you stop that turn or let it finish.
  • Codex writes in a linked folder without asking, in the modes where it may write in the workspace, because that is how it is given a writable folder. The writable folders are the links as they are now. A folder from an earlier turn does not stay once the link is gone, and the workspace’s own folder is not added as a second writable folder. A change while Codex is still starting applies before the first turn. A write it still asks about is not approved merely because the file is in a linked folder. Plan stays read-only.
  • Other agents receive the folder when their protocol offers extra folders. An idle chat restarts at once without a folder you unlink, and a running chat takes a new link the next time it starts. If the agent does not offer that, the picker says so. The link is still saved for the other chats in the workspace.

ACP writes through the app may enter a linked folder only for the exact file shown in an edit permission approved in this turn, or in Bypass permissions. A path-only edit card works without a diff: it shows the resolved target and approval grants that file. Hidden locations and paths hidden by another preview grant nothing. Allow always does not retain this client-write grant across turns. Denial, cancellation, a different session or a symlink retargeted while the card is open grants no write.

A permission request that reaches the app is not auto-approved by the rule for the workspace’s own folder. Native permissions can allow an edit before that request reaches the app.

The note under the chips says when this chat takes a new link. It does not say the next message will, when a message you send now would be added to the turn that is already running.

What if the other workspace is archived or removed?

The chip stays and says Archived or Removed. Its folder is no longer given to agents. A turn that already had the folder is stopped, and that chat says a linked folder was taken away. Archive, delete and restore wait for agents that still have the folder to stop before changing its files. No new turn gets the folder until the operation ends. Restoring the workspace then makes the folder available again. You can still unlink it.

This also covers a chat that was still starting or receiving the folder when the operation began.

What if that folder is no longer the workspace?

The chip stays and says Unavailable: this folder is no longer that workspace’s. A symbolic link, a folder whose real path is not the one that was saved, or a folder git does not count as that workspace’s checkout is not given to agents and is not opened. Putting the checkout back makes the folder available again.

Do checkpoints cover a linked folder?

No. A checkpoint and Revert to here cover only this workspace’s folder. Files in a linked workspace are left as they are.

Reverting files or bringing back saved changes also stops agents that can write here through a link and waits for them to exit. Their chats say why they stopped.

Process records save every granted workspace before the agent receives its folder, including later additions. Removed grants stay recorded until that process exits. Crash recovery reserves the owner and all linked workspaces, across repositories; Stop and Continue from any of them apply to the same recorded processes. An older or unreadable agent grant record cannot identify removed links, so every workspace waits for that process decision while Settings and saved chats remain available.

Where to go next

Get microManager

Free, no account, for macOS, Windows and Linux. It runs the agent CLIs you already have installed and signed in.

curl -fsSL https://micromanager.win/install.sh | sh

That installs it on macOS and Linux. On Windows, paste this into PowerShell:

irm https://micromanager.win/install.ps1 | iex

By downloading, installing or using microManager you agree to its terms of use. The privacy policy says what it sends and stores.