Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

docs: explain the two local-directory execution modes (MUL-5707) (#6913)

Bohan Jiang09efbe597d5e
diff --git a/apps/docs/content/docs/cli.ja.mdx b/apps/docs/content/docs/cli.ja.mdx
index 96e47b6617..3379fb8820 100644
--- a/apps/docs/content/docs/cli.ja.mdx
+++ b/apps/docs/content/docs/cli.ja.mdx
@@ -246,7 +246,7 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
| | `cancel-task <task-id>` | 実行中またはキュー中のタスクをキャンセル | `--issue` |
| `project` | `list/get/create/update/delete` | プロジェクトを管理 | |
| | `status <id> <status>` | プロジェクトのステータスを変更 | |
-| | `resource list/add/update/remove` | プロジェクトの追加リソースを管理 | `--type`、`--url` |
+| | `resource list/add/update/remove` | プロジェクトの追加リソースを管理 | `--type`、`--url`、`--local-path`、`--daemon-id`、`--execution-mode`(ローカルディレクトリの `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | ワークスペースのラベルを管理 | |
| `property` | `list/get/create/update/archive/unarchive` | ワークスペースのカスタムプロパティを管理 | `create`: `--name`、`--type`、`--option`(繰り返し可);`list`: `--include-archived`;タイプは作成後に変更できません |
| `agent` | `list/get/create/update/archive/restore` | エージェントを管理 | `--name`、`--runtime-id`(`create` では必須)、`--instructions`、`--model`、`--thinking-level`、`--mcp-config`、`--permission-mode`、`--max-concurrent-tasks` |
diff --git a/apps/docs/content/docs/cli.ko.mdx b/apps/docs/content/docs/cli.ko.mdx
index 1d23c7e3db..851e62851e 100644
--- a/apps/docs/content/docs/cli.ko.mdx
+++ b/apps/docs/content/docs/cli.ko.mdx
@@ -246,7 +246,7 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
| | `cancel-task <task-id>` | 실행 중 또는 큐 대기 중인 태스크 취소 | `--issue` |
| `project` | `list/get/create/update/delete` | 프로젝트 관리 | |
| | `status <id> <status>` | 프로젝트 상태 변경 | |
-| | `resource list/add/update/remove` | 프로젝트 추가 리소스 관리 | `--type`, `--url` |
+| | `resource list/add/update/remove` | 프로젝트 추가 리소스 관리 | `--type`, `--url`, `--local-path`, `--daemon-id`, `--execution-mode`(로컬 디렉터리의 `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | 워크스페이스 라벨 관리 | |
| `property` | `list/get/create/update/archive/unarchive` | 워크스페이스 사용자 지정 속성 관리 | `create`: `--name`, `--type`, `--option`(반복 가능). `list`: `--include-archived`. 유형은 생성 후 변경 불가 |
| `agent` | `list/get/create/update/archive/restore` | 에이전트 관리 | `--name`, `--runtime-id`(`create`에서 필수), `--instructions`, `--model`, `--thinking-level`, `--mcp-config`, `--permission-mode`, `--max-concurrent-tasks` |
diff --git a/apps/docs/content/docs/cli.mdx b/apps/docs/content/docs/cli.mdx
index 80c8f005f2..5add2210a0 100644
--- a/apps/docs/content/docs/cli.mdx
+++ b/apps/docs/content/docs/cli.mdx
@@ -267,7 +267,7 @@ The tables below cover every current top-level command, grouped the way the CLI
| | `cancel-task <task-id>` | Cancel a running or queued task | `--issue` |
| `project` | `list/get/create/update/delete` | Manage projects | |
| | `status <id> <status>` | Change project status | |
-| | `resource list/add/update/remove` | Manage project resources | `--type`, `--url` |
+| | `resource list/add/update/remove` | Manage project resources | `--type`, `--url`, `--local-path`, `--daemon-id`, `--execution-mode` (`in_place` / `worktree` for a local directory) |
| `label` | `list/get/create/update/delete` | Manage workspace labels | |
| `property` | `list/get/create/update/archive/unarchive` | Manage workspace custom properties | `create`: `--name`, `--type`, `--option` (repeatable); `list`: `--include-archived`; the type cannot be changed after creation |
| `agent` | `list/get/create/update/archive/restore` | Manage agents | `--name`, `--runtime-id` (required for `create`), `--instructions`, `--model`, `--thinking-level`, `--mcp-config`, `--permission-mode`, `--max-concurrent-tasks` |
diff --git a/apps/docs/content/docs/cli.zh.mdx b/apps/docs/content/docs/cli.zh.mdx
index 694ef84c28..eda3029284 100644
--- a/apps/docs/content/docs/cli.zh.mdx
+++ b/apps/docs/content/docs/cli.zh.mdx
@@ -246,7 +246,7 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
| | `cancel-task <task-id>` | 取消运行中或排队中的 task | `--issue` |
| `project` | `list/get/create/update/delete` | 管理项目 | |
| | `status <id> <status>` | 修改项目状态 | |
-| | `resource list/add/update/remove` | 管理项目附加资源 | `--type`、`--url` |
+| | `resource list/add/update/remove` | 管理项目附加资源 | `--type`、`--url`、`--local-path`、`--daemon-id`、`--execution-mode`(本地目录的 `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | 管理工作区标签 | |
| `property` | `list/get/create/update/archive/unarchive` | 管理工作区自定义属性 | `create`:`--name`、`--type`、`--option`(可重复);`list`:`--include-archived`;类型创建后不可修改 |
| `agent` | `list/get/create/update/archive/restore` | 管理智能体 | `--name`、`--runtime-id`(`create` 必填)、`--instructions`、`--model`、`--thinking-level`、`--mcp-config`、`--permission-mode`、`--max-concurrent-tasks` |
diff --git a/apps/docs/content/docs/project-resources.ja.mdx b/apps/docs/content/docs/project-resources.ja.mdx
index 7979b8900b..af329fcba4 100644
--- a/apps/docs/content/docs/project-resources.ja.mdx
+++ b/apps/docs/content/docs/project-resources.ja.mdx
@@ -44,8 +44,11 @@ import { Callout } from "fumadocs-ui/components/callout";
1. Desktop のローカルデーモンがオンラインであることを確認します。
-2. プロジェクトの **リソース** を開きます。
+2. プロジェクトの **リソース** を開きます。プロジェクト作成ダイアログの **ローカルディレクトリ** タブでも、プロジェクトができる前に同じ選択ができます。
3. 「ローカルディレクトリを追加」を選び、使用するフォルダを選択します。
+4. タスクがそれをどう使うかを選びます — **直接** か **並行** で、違いは「タスクがディレクトリを共有する方法」を参照してください。フォルダが git リポジトリで、そのマシンのランタイムが隔離を実行できる場合、Desktop は **並行** を、そうでなければ **直接** を初期選択します。その場で変更できますし、あとから **リソース** でディレクトリ横の鉛筆アイコンからも変更できます。
+
+初期選択は、いま紐づけようとしているディレクトリにだけ適用されます。以前に紐づけたディレクトリは保存時のモードのままです — 既存の設定が知らないうちに切り替わることはありません。
ディレクトリは絶対パスで、すでに存在し、現在のデーモンが読み書きできる必要があります。次のパスは拒否されます: システムのルートとドライブのルート(`/`、`C:\`)、ホームディレクトリ自体と各ホームディレクトリの親(`/Users`、`/home`、`/root` など)、および `/etc`、`/var`、`/tmp`、`/usr`、`/opt` などのシステムディレクトリ。選択したパスがシンボリックリンクの場合は、まず実体のパスに解決してから同じルールでもう一度検証されます。直列ロックも実体のパスに対して働きます。
@@ -57,19 +60,19 @@ import { Callout } from "fumadocs-ui/components/callout";
## タスクがディレクトリを共有する方法
-ローカルディレクトリには 2 つの実行モードがあり、リソースごとに設定します。リソースパネルから切り替えられるほか、CLI では `--execution-mode` を使います。
+ローカルディレクトリには 2 つの実行モードがあり、リソースごとに設定します。リソースパネルから切り替えられるほか、CLI では `--execution-mode` を使います。Desktop での表示は **直接** と **並行** で、API・CLI とこのページの以降では識別子を使います。
-### `in_place`(既定)
+### `in_place`(既定)— 「直接」
エージェントはあなたのディレクトリで直接作業し、タスクは一度に1つずつ実行されます。2 つのタスクが同じ実体のディレクトリを使う場合、後から来たタスクは `waiting_local_directory` に入り、先のタスクがディレクトリを解放してから続行します。異なるシンボリックリンク経由で同じディレクトリに到達する 2 つのパスも、同じように直列化されます。
待機中にディレクトリが変更されることはありません。待機中のタスクはキャンセルできます。キャンセルしなければ、ディレクトリが使えるようになるまで待ち続けます。
-### `worktree`
+### `worktree` — 「並行」
各タスクが、あなたのリポジトリの独立した [git ワークツリー](https://git-scm.com/docs/git-worktree) を受け取ります。ワークツリーはランタイム自身のワークスペースディレクトリ内に作成されます。**同じディレクトリに対するタスクは並行して実行され、待機は発生しません**。どのタスクもあなたの作業コピーには書き込みません。
-このモードには、コミットが 1 つ以上ある git リポジトリであることが必要です。そうでない場合、タスクは黙って直列実行に戻るのではなく、明示的なエラーで失敗します。そのマシンのランタイムも、このモードを実装しているバージョンである必要があり、これは 2 回検証されます。リソースの保存時に古すぎれば拒否されアップグレードを促され、さらに各タスクは実際にそれを受け取ったランタイムに対して再度検証されます — つまりリソース保存後にダウングレードされたマシンでは、タスクが黙ってその場で実行されるのではなく、理由付きでキャンセルされます。`worktree` を選ぶことは隔離を求めることであり、代わりに作業コピーを書き換えることがフォールバックになることはありません。
+このモードには、コミットが 1 つ以上ある git リポジトリであることが必要です。そうでない場合、タスクは黙って直列実行に戻るのではなく、明示的なエラーで失敗します。そのマシンのランタイムも、このモードを実装している必要があります。ランタイムは接続時にその能力を宣言し、Multica はバージョン番号ではなくこの宣言で判定します — 開発ビルドは、実装がまったくないまま十分に新しく見えるバージョン文字列を持ちうるからです。この宣言は 2 回検証されます。そのマシンのランタイムが能力を宣言していない間、リソースの保存は拒否され、そのマシンのアプリを更新するよう促されます。さらに各タスクは実際にそれを受け取ったランタイムに対して再度検証されます — つまりリソース保存後にダウングレードされたマシンでは、タスクが黙ってその場で実行されるのではなく、理由付きでキャンセルされます。`worktree` を選ぶことは隔離を求めることであり、代わりに作業コピーを書き換えることがフォールバックになることはありません。
エージェントが見るもの、あなたが受け取るもの:
@@ -81,7 +84,7 @@ import { Callout } from "fumadocs-ui/components/callout";
ワークツリーはランタイムのワークスペースディレクトリ内にあるため、通常のクリーンアップ周期で回収されます。あなたのリポジトリに残るのはブランチだけです。
<Callout type="warn">
-**セルフホスト運用者向け:** このモードの分離はサーバー側で強制されます(リソース保存時と、ランタイムが各タスクを取得する時点の二重チェック)。そのため、ランタイムをいつダウングレードしても検出されます。検出できない唯一の組み合わせは、最低バージョン未満のランタイムが接続されたまま、サーバーをこの機能より前のビルドへロールバックすることです — 古いサーバーにはこのゲートがなく、古いランタイムは `execution_mode` を無視してタスクを元のディレクトリで直接実行してしまいます。`worktree` リソースが存在する間は、対象マシンのランタイムがすべて最新でない限り、サーバーをこのリリースより前へロールバックしないでください。
+**セルフホスト運用者向け:** このモードの分離はサーバー側で強制されます(リソース保存時と、ランタイムが各タスクを取得する時点の二重チェック)。そのため、ランタイムをいつダウングレードしても検出されます。検出できない唯一の組み合わせは、このモードを実装していないランタイムが接続されたまま、サーバーをこの機能より前のビルドへロールバックすることです — 古いサーバーにはこのゲートがなく、そうしたランタイムは `execution_mode` を無視してタスクを元のディレクトリで直接実行してしまいます。`worktree` リソースが存在する間は、対象マシンのランタイムがすべて最新でない限り、サーバーをこのリリースより前へロールバックしないでください。
</Callout>
<Callout type="info">
diff --git a/apps/docs/content/docs/project-resources.ko.mdx b/apps/docs/content/docs/project-resources.ko.mdx
index a0935e6b9e..c423b2cf22 100644
--- a/apps/docs/content/docs/project-resources.ko.mdx
+++ b/apps/docs/content/docs/project-resources.ko.mdx
@@ -44,8 +44,11 @@ import { Callout } from "fumadocs-ui/components/callout";
1. Desktop의 로컬 데몬이 온라인인지 확인합니다.
-2. 프로젝트의 **리소스**를 엽니다.
+2. 프로젝트의 **리소스**를 엽니다. 프로젝트 생성 대화상자의 **로컬 디렉터리** 탭에서도 프로젝트가 만들어지기 전에 같은 선택을 할 수 있습니다.
3. "로컬 디렉터리 추가"를 선택한 뒤 사용할 폴더를 고릅니다.
+4. 작업이 그 폴더를 어떻게 사용할지 고릅니다 — **직접** 또는 **병렬**이며, 차이는 "작업이 디렉터리를 공유하는 방식"에 설명되어 있습니다. 폴더가 git 저장소이고 그 기기의 런타임이 격리를 수행할 수 있으면 Desktop이 **병렬**을, 그렇지 않으면 **직접**을 미리 선택합니다. 그 자리에서 바꿀 수 있고, 나중에 **리소스**에서 디렉터리 옆 연필 아이콘으로도 바꿀 수 있습니다.
+
+미리 선택은 지금 연결하는 디렉터리에만 적용됩니다. 이전에 연결한 디렉터리는 저장할 때의 모드를 그대로 유지합니다 — 기존 설정이 모르는 사이에 바뀌지 않습니다.
디렉터리는 절대 경로여야 하고 이미 존재해야 하며 현재 데몬이 읽고 쓸 수 있어야 합니다. 시스템 루트와 드라이브 루트(`/`, `C:\`), 사용자 홈 디렉터리 자체 및 각 홈 디렉터리의 상위 경로(`/Users`, `/home`, `/root`), 그리고 `/etc`, `/var`, `/tmp`, `/usr`, `/opt` 같은 시스템 디렉터리는 거부됩니다. 선택한 경로가 심볼릭 링크이면 실제 경로를 먼저 해석한 뒤 같은 규칙으로 다시 확인하며 직렬 잠금도 실제 경로를 기준으로 적용됩니다.
@@ -57,19 +60,19 @@ import { Callout } from "fumadocs-ui/components/callout";
## 작업이 디렉터리를 공유하는 방식
-로컬 디렉터리에는 두 가지 실행 모드가 있으며 리소스별로 설정합니다. 리소스 패널에서 전환할 수 있고, CLI에서는 `--execution-mode`를 사용합니다.
+로컬 디렉터리에는 두 가지 실행 모드가 있으며 리소스별로 설정합니다. 리소스 패널에서 전환할 수 있고, CLI에서는 `--execution-mode`를 사용합니다. Desktop에서는 **직접**과 **병렬**로 표시하며, API와 CLI, 이 문서의 나머지 부분에서는 식별자를 사용합니다.
-### `in_place`(기본값)
+### `in_place`(기본값) — "직접"
에이전트가 사용자의 디렉터리에서 직접 작업하며, 작업은 한 번에 하나씩 실행됩니다. 두 실행 태스크가 같은 실제 디렉터리를 사용하면 나중에 도착한 태스크가 `waiting_local_directory` 상태로 들어가 앞선 태스크가 디렉터리를 해제할 때까지 기다립니다. 서로 다른 심볼릭 링크 경로가 같은 디렉터리를 가리켜도 직렬로 실행됩니다.
기다리는 동안 디렉터리는 변경되지 않습니다. 대기 중인 태스크는 취소할 수 있으며 취소하지 않으면 디렉터리를 사용할 수 있을 때까지 계속 기다립니다.
-### `worktree`
+### `worktree` — "병렬"
각 작업이 저장소의 독립된 [git 워크트리](https://git-scm.com/docs/git-worktree)를 받으며, 워크트리는 런타임 자체의 작업 공간 디렉터리 안에 생성됩니다. **같은 디렉터리에 대한 작업들이 동시에 실행되고 어느 것도 대기하지 않으며**, 어느 것도 사용자의 작업 사본에 쓰지 않습니다.
-이 모드는 커밋이 하나 이상 있는 git 저장소를 요구합니다. 그렇지 않으면 조용히 직렬 실행으로 되돌아가는 대신 명시적인 오류로 실패합니다. 해당 머신의 런타임도 이 모드를 구현한 버전이어야 하며, 이는 두 번 확인됩니다. 리소스를 저장할 때 너무 오래되었으면 거부되고 업그레이드 안내가 표시되며, 각 작업은 실제로 그것을 가져간 런타임을 기준으로 다시 확인됩니다 — 따라서 리소스를 저장한 뒤 다운그레이드된 머신에서는 작업이 조용히 제자리에서 실행되는 대신 이유와 함께 취소됩니다. `worktree`를 요청하는 것은 격리를 요청하는 것이며, 대신 작업 사본을 수정하는 것이 대체 동작이 되는 일은 없습니다.
+이 모드는 커밋이 하나 이상 있는 git 저장소를 요구합니다. 그렇지 않으면 조용히 직렬 실행으로 되돌아가는 대신 명시적인 오류로 실패합니다. 해당 머신의 런타임도 이 모드를 구현하고 있어야 합니다. 런타임은 연결할 때 그 기능을 선언하며, Multica는 버전 번호가 아니라 이 선언을 기준으로 판단합니다 — 개발 빌드는 구현이 전혀 없는 채로 충분히 새것처럼 보이는 버전 문자열을 가질 수 있기 때문입니다. 이 선언은 두 번 확인됩니다. 해당 머신의 런타임이 기능을 선언하지 않는 동안에는 리소스 저장이 거부되고 그 머신의 앱을 업데이트하라는 안내가 표시되며, 각 작업은 실제로 그것을 가져간 런타임을 기준으로 다시 확인됩니다 — 따라서 리소스를 저장한 뒤 다운그레이드된 머신에서는 작업이 조용히 제자리에서 실행되는 대신 이유와 함께 취소됩니다. `worktree`를 요청하는 것은 격리를 요청하는 것이며, 대신 작업 사본을 수정하는 것이 대체 동작이 되는 일은 없습니다.
에이전트가 보는 것과 사용자가 받는 것:
@@ -81,7 +84,7 @@ import { Callout } from "fumadocs-ui/components/callout";
워크트리는 런타임의 작업 공간 디렉터리 안에 있으므로 일반적인 정리 주기에 따라 회수되며, 저장소에는 브랜치만 남습니다.
<Callout type="warn">
-**셀프 호스팅 운영자 주의:** 이 모드의 격리는 서버가 강제합니다(리소스 저장 시 한 번, 런타임이 각 작업을 가져갈 때 다시 한 번). 따라서 런타임을 언제 다운그레이드하더라도 차단됩니다. 유일하게 차단되지 않는 조합은 최소 버전 미만의 런타임이 연결된 상태에서 서버를 이 기능 이전 빌드로 롤백하는 것입니다 — 구버전 서버에는 이 게이트가 없고, 구버전 런타임은 `execution_mode`를 무시한 채 작업을 원본 디렉터리에서 그대로 실행합니다. `worktree` 리소스가 존재하는 동안에는 해당 머신의 런타임이 모두 최신이 아닌 한 서버를 이 릴리스 이전으로 롤백하지 마십시오.
+**셀프 호스팅 운영자 주의:** 이 모드의 격리는 서버가 강제합니다(리소스 저장 시 한 번, 런타임이 각 작업을 가져갈 때 다시 한 번). 따라서 런타임을 언제 다운그레이드하더라도 차단됩니다. 유일하게 차단되지 않는 조합은 이 모드를 구현하지 않은 런타임이 연결된 상태에서 서버를 이 기능 이전 빌드로 롤백하는 것입니다 — 구버전 서버에는 이 게이트가 없고, 그런 런타임은 `execution_mode`를 무시한 채 작업을 원본 디렉터리에서 그대로 실행합니다. `worktree` 리소스가 존재하는 동안에는 해당 머신의 런타임이 모두 최신이 아닌 한 서버를 이 릴리스 이전으로 롤백하지 마십시오.
</Callout>
<Callout type="info">
diff --git a/apps/docs/content/docs/project-resources.mdx b/apps/docs/content/docs/project-resources.mdx
index 25fcbf4259..b00e352367 100644
--- a/apps/docs/content/docs/project-resources.mdx
+++ b/apps/docs/content/docs/project-resources.mdx
@@ -44,8 +44,11 @@ If your directory is an ordinary git repo you can clone, **use `github_repo` ins
1. Make sure Desktop's local daemon is online.
-2. Open the project's **Resources**.
+2. Open the project's **Resources**, or the **Local directory** tab of the create-project dialog — the same choice is available before the project exists.
3. Choose "Add local directory", then pick the folder to use.
+4. Pick how tasks should use it — **Direct** or **Parallel**, described under "How tasks share the directory". Desktop preselects **Parallel** when the folder is a git repository the runtime on that machine can isolate, and **Direct** otherwise. Change it right there, or later from **Resources** with the pencil next to the directory.
+
+Preselection applies only to a directory you are linking now. A directory linked earlier keeps the mode it was saved with — an existing setup is never switched under you.
The directory must be an absolute path, must already exist, and must be readable and writable by the current daemon. These paths are rejected: system roots and drive roots (`/`, `C:\`), home directories themselves and the parents of home directories (such as `/Users`, `/home`, `/root`), and system directories such as `/etc`, `/var`, `/tmp`, `/usr`, and `/opt`. If the chosen path is a symlink, it is resolved to its real path first and validated again by the same rules; the serial lock also applies to the real path.
@@ -57,19 +60,19 @@ In the default `in_place` mode a local directory is not an isolated environment:
## How tasks share the directory
-A local directory has two execution modes, set per resource with `execution_mode`.
+A local directory has two execution modes, set per resource with `execution_mode`. Desktop labels them **Direct** and **Parallel**; the API, the CLI and the rest of this page use the identifiers.
-### `in_place` (default)
+### `in_place` (default) — "Direct"
The agent works directly in your directory, and tasks run one at a time. When two tasks use the same real directory, the later one enters `waiting_local_directory` and continues after the earlier one releases the directory. Two paths that reach the same directory through different symlinks serialize the same way.
Waiting does not modify the directory. A waiting task can be cancelled; otherwise it waits until the directory becomes available.
-### `worktree`
+### `worktree` — "Parallel"
Each task gets its own [git worktree](https://git-scm.com/docs/git-worktree) of your repo, created inside the runtime's own workspace directory. **Tasks on the same directory run concurrently — none of them wait**, and none of them write to your working copy.
-Requires the directory to be a git repository with at least one commit. If it is not, tasks fail with an explicit error rather than quietly falling back to serial execution. The runtime on that machine must also be new enough to implement the mode, and that is enforced twice: saving the resource is refused with an upgrade hint while the runtime is too old, and each task is checked again against the runtime that actually claims it — so a machine downgraded after the resource was saved has its tasks cancelled with a reason instead of silently running them in place. Asking for `worktree` is asking for isolation; editing your working copy instead is never the fallback.
+Requires the directory to be a git repository with at least one commit. If it is not, tasks fail with an explicit error rather than quietly falling back to serial execution. The runtime on that machine must also implement the mode. It declares that when it connects, and Multica gates on the declaration rather than on a version number — a development build can carry a version string that looks new enough while having none of the implementation. The declaration is checked twice: saving the resource is refused, with a hint to update the app on that machine, while its runtime does not declare the capability; and each task is checked again against the runtime that actually claims it — so a machine downgraded after the resource was saved has its tasks cancelled with a reason instead of silently running them in place. Asking for `worktree` is asking for isolation; editing your working copy instead is never the fallback.
What the agent sees, and what you get back:
@@ -81,7 +84,7 @@ What the agent sees, and what you get back:
Because the worktree lives in the runtime's workspace directory, it is reclaimed on the normal cleanup schedule; only the branch persists in your repo.
<Callout type="warn">
-**Self-hosted operators:** isolation for this mode is enforced by the server (at save time and again when a runtime claims each task), so a runtime downgraded at any point is caught. The combination that is *not* caught is rolling the server back to a build that predates this feature while runtimes below the minimum are still connected — an old server has no gate, and an old runtime ignores `execution_mode` and would run the task in place. Do not roll the server back past this release while `worktree` resources exist unless every runtime on those machines is up to date.
+**Self-hosted operators:** isolation for this mode is enforced by the server (at save time and again when a runtime claims each task), so a runtime downgraded at any point is caught. The combination that is *not* caught is rolling the server back to a build that predates this feature while runtimes that do not implement the mode are still connected — an old server has no gate, and such a runtime ignores `execution_mode` and would run the task in place. Do not roll the server back past this release while `worktree` resources exist unless every runtime on those machines is up to date.
</Callout>
<Callout type="info">
diff --git a/apps/docs/content/docs/project-resources.zh.mdx b/apps/docs/content/docs/project-resources.zh.mdx
index 9facc11b66..94548d1e57 100644
--- a/apps/docs/content/docs/project-resources.zh.mdx
+++ b/apps/docs/content/docs/project-resources.zh.mdx
@@ -44,8 +44,11 @@ import { Callout } from "fumadocs-ui/components/callout";
1. 确认 Desktop 的本地守护进程在线。
-2. 打开项目的 **资源**。
+2. 打开项目的 **资源**,或者创建项目对话框里的 **本地目录** 标签页 —— 项目还没建出来时也能做同样的选择。
3. 选择"添加本地目录",再选择要使用的文件夹。
+4. 选择任务如何使用它 —— **原地** 还是 **并行**,两者的区别见"任务如何共享这个目录"。如果这个文件夹是 git 仓库、并且那台机器上的运行时能做隔离,Desktop 会预选 **并行**,否则预选 **原地**。当场可以改,之后也可以在 **资源** 里点目录旁边的铅笔图标改。
+
+预选只作用于你此刻正在关联的目录。之前关联好的目录仍然保持保存时的模式 —— 已有的配置不会在你不知情的情况下被切换。
目录必须是绝对路径,已经存在,并且当前守护进程可以读取和写入。以下路径会被拒绝:系统根目录和盘符根(`/`、`C:\`)、用户主目录本身及各主目录的上级(如 `/Users`、`/home`、`/root`),以及 `/etc`、`/var`、`/tmp`、`/usr`、`/opt` 等系统目录。如果所选路径是符号链接,会先解析为真实路径再按同样的规则校验一次,串行锁也按真实路径生效。
@@ -57,19 +60,19 @@ import { Callout } from "fumadocs-ui/components/callout";
## 任务如何共享这个目录
-本地目录有两种执行模式,按资源逐个设置。在资源面板里可以直接切换,CLI 用 `--execution-mode`。
+本地目录有两种执行模式,按资源逐个设置。在资源面板里可以直接切换,CLI 用 `--execution-mode`。Desktop 里这两种模式显示为 **原地** 和 **并行**;API、CLI 和本页其余部分都使用标识符。
-### `in_place`(默认)
+### `in_place`(默认)—— “原地”
智能体直接在你的目录里工作,任务一次只跑一条。两条执行任务使用同一个真实目录时,后到的任务进入 `waiting_local_directory`,等前一条释放目录后继续。两个路径经不同符号链接指向同一目录时,同样串行。
等待不会修改目录。等待中的任务可以取消,否则会一直等到目录可用。
-### `worktree`
+### `worktree` —— “并行”
每条任务拿到你仓库的一个独立 [git worktree](https://git-scm.com/docs/git-worktree),建在运行时自己的工作区目录里。**同一目录上的任务并发执行,谁都不用排队**,并且都不会写你的工作副本。
-要求这个目录是一个至少有一次提交的 git 仓库。如果不是,任务会明确报错,而不是悄悄退回串行。那台机器上的运行时版本也必须支持该模式,并且会检查两次:保存资源时版本过旧会被拒绝并提示升级;每条任务在被真正领取时还会再按领取它的运行时检查一次 —— 所以资源保存之后才降级的机器,其任务会被带原因取消,而不是悄悄原地跑掉。选择 `worktree` 就是在要求隔离,把它换成“直接改你的工作副本”永远不是兜底方案。
+要求这个目录是一个至少有一次提交的 git 仓库。如果不是,任务会明确报错,而不是悄悄退回串行。那台机器上的运行时也必须实现了该模式。运行时在连接时会声明这项能力,Multica 判断的是这个声明而不是版本号 —— 一个开发构建完全可能带着看起来足够新的版本号,却根本没有对应的实现。这个声明会被检查两次:只要那台机器的运行时没有声明该能力,保存资源就会被拒绝,并提示去升级那台机器上的 App;每条任务在被真正领取时还会再按领取它的运行时检查一次 —— 所以资源保存之后才降级的机器,其任务会被带原因取消,而不是悄悄原地跑掉。选择 `worktree` 就是在要求隔离,把它换成“直接改你的工作副本”永远不是兜底方案。
智能体看到什么、你拿回什么:
@@ -81,7 +84,7 @@ import { Callout } from "fumadocs-ui/components/callout";
由于 worktree 位于运行时的工作区目录内,它会按正常的清理周期回收;只有分支会留在你的仓库里。
<Callout type="warn">
-**自托管运维注意:** 该模式的隔离由服务端强制(保存资源时检查一次,运行时领取每条任务时再检查一次),所以无论何时降级运行时都会被拦住。唯一拦不住的组合是:把服务端回滚到本功能之前的版本,同时还连着低于最低版本的运行时 —— 旧服务端没有这道门禁,而旧运行时会忽略 `execution_mode`、直接在原目录里跑任务。只要还存在 `worktree` 资源,就不要把服务端回滚到本版本之前,除非那些机器上的运行时全部升级到位。
+**自托管运维注意:** 该模式的隔离由服务端强制(保存资源时检查一次,运行时领取每条任务时再检查一次),所以无论何时降级运行时都会被拦住。唯一拦不住的组合是:把服务端回滚到本功能之前的版本,同时还连着没有实现该模式的运行时 —— 旧服务端没有这道门禁,而这样的运行时会忽略 `execution_mode`、直接在原目录里跑任务。只要还存在 `worktree` 资源,就不要把服务端回滚到本版本之前,除非那些机器上的运行时全部升级到位。
</Callout>
<Callout type="info">
diff --git a/apps/docs/content/docs/troubleshooting.ja.mdx b/apps/docs/content/docs/troubleshooting.ja.mdx
index ebb4181e0b..bd42e50d5c 100644
--- a/apps/docs/content/docs/troubleshooting.ja.mdx
+++ b/apps/docs/content/docs/troubleshooting.ja.mdx
@@ -81,7 +81,9 @@ multica issue runs <issue-id>
これは、進行中の別のタスクが同じローカルディレクトリを使っていることを意味します。2 つのエージェントが同じファイルを同時に変更しないよう、Multica はディレクトリロックの解放を待ちます。
-通常は前のタスクが終わるのを待つだけで十分です。前のタスクが固まっている場合は、その実行ログから停止するか、現在のエージェントに別のローカルディレクトリを選んでください。このディレクトリの排他はデーモンがメモリ内で管理しており、ディスクにロックファイルは書き込まれません。ロック状態が異常だと疑われる場合は `multica daemon restart` で解放されます。手動で削除すべきファイルはありません。
+この待機はディレクトリの `in_place`(「直接」)モードにのみ存在します。ディレクトリが git リポジトリであれば、リソースを `worktree`(「並行」)に切り替えるとキューそのものがなくなります。各タスクが自分のワークツリーを受け取り、成果をブランチとして返すため、どのタスクも待ちません。[プロジェクトリソース](/project-resources#タスクがディレクトリを共有する方法)を参照してください。
+
+そうでなければ、通常は前のタスクが終わるのを待つだけで十分です。前のタスクが固まっている場合は、その実行ログから停止するか、現在のエージェントに別のローカルディレクトリを選んでください。このディレクトリの排他はデーモンがメモリ内で管理しており、ディスクにロックファイルは書き込まれません。ロック状態が異常だと疑われる場合は `multica daemon restart` で解放されます。手動で削除すべきファイルはありません。
## AI コーディングツールが起動しない
diff --git a/apps/docs/content/docs/troubleshooting.ko.mdx b/apps/docs/content/docs/troubleshooting.ko.mdx
index 7a539327b9..9d044e726d 100644
--- a/apps/docs/content/docs/troubleshooting.ko.mdx
+++ b/apps/docs/content/docs/troubleshooting.ko.mdx
@@ -81,7 +81,9 @@ multica issue runs <issue-id>
다른 실행 중 태스크가 같은 로컬 디렉터리를 사용하고 있다는 뜻입니다. Multica는 두 에이전트가 같은 파일을 동시에 수정하지 않도록 디렉터리 잠금이 해제되기를 기다립니다.
-일반적으로 앞선 실행 태스크가 끝날 때까지 기다리면 됩니다. 앞선 태스크가 멈췄다면 해당 실행 로그에서 중지할 수 있고, 현재 에이전트에 다른 로컬 디렉터리를 선택할 수도 있습니다. 이 디렉터리 상호 배제는 데몬이 메모리에서 관리하며 디스크에 lock 파일을 쓰지 않습니다. 잠금 상태가 비정상이라고 의심되면 `multica daemon restart`를 실행해 해제하세요. 직접 삭제해야 할 파일은 없습니다.
+이 대기는 디렉터리의 `in_place`("직접") 모드에서만 발생합니다. 디렉터리가 git 저장소라면 리소스를 `worktree`("병렬")로 전환하면 대기열 자체가 사라집니다. 각 작업이 자기 워크트리를 받고 결과를 브랜치로 돌려주므로 어느 작업도 기다리지 않습니다. [프로젝트 리소스](/project-resources#작업이-디렉터리를-공유하는-방식)를 참고하세요.
+
+그렇지 않으면 일반적으로 앞선 실행 태스크가 끝날 때까지 기다리면 됩니다. 앞선 태스크가 멈췄다면 해당 실행 로그에서 중지할 수 있고, 현재 에이전트에 다른 로컬 디렉터리를 선택할 수도 있습니다. 이 디렉터리 상호 배제는 데몬이 메모리에서 관리하며 디스크에 lock 파일을 쓰지 않습니다. 잠금 상태가 비정상이라고 의심되면 `multica daemon restart`를 실행해 해제하세요. 직접 삭제해야 할 파일은 없습니다.
## AI 코딩 도구 시작 실패
diff --git a/apps/docs/content/docs/troubleshooting.mdx b/apps/docs/content/docs/troubleshooting.mdx
index 2d0588247e..e173ee05fb 100644
--- a/apps/docs/content/docs/troubleshooting.mdx
+++ b/apps/docs/content/docs/troubleshooting.mdx
@@ -81,7 +81,9 @@ If the runtime list is missing an expected tool, first confirm the tool runs and
This means another in-flight task is using the same local directory. Multica waits for the directory lock to be released so two agents never modify the same files at once.
-Usually you just wait for the earlier task to finish. If it is stuck, stop it from its execution log, or pick a different local directory for the current agent. This directory mutex lives in the daemon's memory — no lock file is written to disk. If you suspect stale lock state, `multica daemon restart` releases it; there is nothing to delete manually.
+This wait only exists in the directory's `in_place` ("Direct") mode. If the directory is a git repository, switching the resource to `worktree` ("Parallel") removes the queue altogether: each task gets its own worktree and hands its work back as a branch, so nothing waits on anything. See [Project resources](/project-resources#how-tasks-share-the-directory).
+
+Otherwise you just wait for the earlier task to finish. If it is stuck, stop it from its execution log, or pick a different local directory for the current agent. This directory mutex lives in the daemon's memory — no lock file is written to disk. If you suspect stale lock state, `multica daemon restart` releases it; there is nothing to delete manually.
## AI coding tool fails to start
diff --git a/apps/docs/content/docs/troubleshooting.zh.mdx b/apps/docs/content/docs/troubleshooting.zh.mdx
index 723151f0da..f1270435ce 100644
--- a/apps/docs/content/docs/troubleshooting.zh.mdx
+++ b/apps/docs/content/docs/troubleshooting.zh.mdx
@@ -81,7 +81,9 @@ multica issue runs <issue-id>
这表示另一条在途执行任务正在使用同一个本地目录。Multica 会等待目录锁释放,避免两个智能体同时修改同一份文件。
-通常只需等前一条执行任务结束。若前一条已经卡住,可以从它的执行日志中停止;也可以为当前智能体选择其他本地目录。这个目录互斥由守护进程在内存中维护,不写磁盘锁文件;怀疑锁状态异常时运行 `multica daemon restart` 即可释放,没有需要手动删除的文件。
+这种等待只存在于目录的 `in_place`(“原地”)模式。如果这个目录是 git 仓库,把资源切到 `worktree`(“并行”)就没有队列了:每条任务拿到自己的 worktree,并以分支形式交回结果,谁都不用等谁。见[项目资源](/project-resources#任务如何共享这个目录)。
+
+否则通常只需等前一条执行任务结束。若前一条已经卡住,可以从它的执行日志中停止;也可以为当前智能体选择其他本地目录。这个目录互斥由守护进程在内存中维护,不写磁盘锁文件;怀疑锁状态异常时运行 `multica daemon restart` 即可释放,没有需要手动删除的文件。
## AI 编程工具启动失败