You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ Execution flow dialog with mode and model selection:
90
90
## Features
91
91
92
92
-**Plans** — architect produces marked plans that are auto-captured to SQL storage
93
-
-**Execution** — `New session`, `Execute here`, and `Loop` launch paths for approved plans; loops can also target a configured remote opencode server (see [Configuration](docs/configuration.md#remotes))
93
+
-**Execution** — approved-plan launch paths plus direct `/execute-goal` loops in dedicated worktree sessions; plan loops can also target a configured remote opencode server (see [Configuration](docs/configuration.md#remotes))
94
94
-**Loops** — iterative coding/auditing with isolated git worktree and optional Docker sandbox
95
95
-**Review Findings** — persistent, loop-scoped review findings across loop sessions
96
96
-**TUI** — sidebar and execution dialog
@@ -122,14 +122,15 @@ Forge provides these tool groups:
-**Sandbox shell** — `sh` when a sandbox manager is available
127
127
128
128
Loops always run in an isolated git worktree; Docker sandbox is used automatically when available.
129
129
130
130
| Tool | Description |
131
131
|------|-------------|
132
132
|`execute-plan`| Execute a plan using an iterative development loop in an isolated git worktree, or `mode: new-session` to launch it in a fresh standalone session. Args: `title` required; `plan`, `loopName`, `hostSessionId`, `mode` optional. |
133
+
|`execute-goal`| Execute a free-text goal in rotating dedicated code and auditor sessions inside an isolated git worktree. Args: `goal` required; `title`, `loopName`, `maxIterations`, `hostSessionId` optional. |
133
134
|`loop-cancel`| Cancel an active loop by worktree name |
134
135
|`loop-status`| List active/recent loops or get detailed status by worktree name, including cumulative token usage when available. Supports `restart=true` to restart any non-completed loop (`running`, `cancelled`, `errored`, `stalled`). Completed loops are history-only and cannot be restarted. |
135
136
@@ -142,6 +143,7 @@ Loops always run in an isolated git worktree; Docker sandbox is used automatical
142
143
|`/review`| Run a code review on current changes | auditor (subtask) |
143
144
|`/review-plan`| Review a completed implementation against its original plan | auditor (subtask) |
144
145
|`/execute-plan`| Start an iterative development loop in a worktree (or a fresh session with `mode: new-session`) | code |
146
+
|`/execute-goal`| Execute a free-text goal in dedicated worktree sessions until an audit leaves no findings | code |
145
147
|`/loop-status`| Check status of all active loops | code |
146
148
|`/loop-cancel`| Cancel the active loop | code |
147
149
@@ -490,6 +492,10 @@ Symptoms include:
490
492
491
493
The flag must be set before OpenCode starts — setting it inside an already-running session is too late. If OpenCode is launched by a desktop app, service manager, shell alias, terminal profile, or wrapper script, set the variable there and fully restart OpenCode.
492
494
495
+
### Workspace prerequisites
496
+
497
+
Worktree loops require a git repository with at least one commit. OpenCode scopes its instance to project `global` when started in a directory without a root commit, and worktree loop sessions created against a `global` project are invisible to the TUI. If you see a "No git commit in this project" error, create an initial commit and restart OpenCode.
498
+
493
499
## Docker Sandbox
494
500
495
501
Run loop iterations inside an isolated Docker container. Sandbox is optional: when Docker is available and configured, Forge provisions a loop container automatically; otherwise loops run in worktree-only mode.
|`/review-plan`| Review a completed implementation against its original plan. |`auditor`| yes |
43
43
|`/execute-plan`| Start an iterative development loop in a worktree (or launch the plan in a fresh standalone session with `mode: new-session`). |`code`| no |
44
-
|`/execute-goal`| Execute a goal directly in the invoking session inside an isolated worktree, with fresh auditor sessions until no findings remain. |`code`| no |
44
+
|`/execute-goal`| Execute a goal in rotating dedicated code and auditor sessions inside an isolated worktree. |`code`| no |
45
45
|`/loop-status`| Check status of all active loops. |`code`| no |
46
46
|`/loop-cancel`| Cancel the active loop. |`code`| no |
Copy file name to clipboardExpand all lines: docs/api/README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Execution flow dialog with mode and model selection:
93
93
## Features
94
94
95
95
-**Plans** — architect produces marked plans that are auto-captured to SQL storage
96
-
-**Execution** — approved-plan launch paths plus direct `/execute-goal`work in the invoking session; plan loops can also target a configured remote opencode server (see [Configuration](_media/configuration.md#remotes))
96
+
-**Execution** — approved-plan launch paths plus direct `/execute-goal`loops in dedicated worktree sessions; plan loops can also target a configured remote opencode server (see [Configuration](_media/configuration.md#remotes))
97
97
-**Loops** — iterative coding/auditing with isolated git worktree and optional Docker sandbox
98
98
-**Review Findings** — persistent, loop-scoped review findings across loop sessions
99
99
-**TUI** — sidebar and execution dialog
@@ -132,7 +132,7 @@ Loops always run in an isolated git worktree; Docker sandbox is used automatical
132
132
| Tool | Description |
133
133
|------|-------------|
134
134
|`execute-plan`| Execute a plan using an iterative development loop in an isolated git worktree, or `mode: new-session` to launch it in a fresh standalone session. Args: `title` required; `plan`, `loopName`, `hostSessionId`, `mode` optional. |
135
-
|`execute-goal`| Execute a non-empty goal in the invoking session inside an isolated worktree. Fresh auditors run on idle until no findings remain. |
135
+
|`execute-goal`| Execute a free-text goal in rotating dedicated code and auditor sessions inside an isolated git worktree. Args: `goal` required; `title`, `loopName`, `maxIterations`, `hostSessionId` optional. |
136
136
|`loop-cancel`| Cancel an active loop by worktree name |
137
137
|`loop-status`| List active/recent loops or get detailed status by worktree name, including cumulative token usage when available. Supports `restart=true` to restart any non-completed loop (`running`, `cancelled`, `errored`, `stalled`). Completed loops are history-only and cannot be restarted. |
138
138
@@ -145,7 +145,7 @@ Loops always run in an isolated git worktree; Docker sandbox is used automatical
145
145
|`/review`| Run a code review on current changes | auditor (subtask) |
146
146
|`/review-plan`| Review a completed implementation against its original plan | auditor (subtask) |
147
147
|`/execute-plan`| Start an iterative development loop in a worktree (or a fresh session with `mode: new-session`) | code |
148
-
|`/execute-goal`| Execute a goal directly in the invoking session inside a managed worktree loop| code |
148
+
|`/execute-goal`| Execute a free-text goal in dedicated worktree sessions until an audit leaves no findings| code |
149
149
|`/loop-status`| Check status of all active loops | code |
150
150
|`/loop-cancel`| Cancel the active loop | code |
151
151
@@ -494,6 +494,10 @@ Symptoms include:
494
494
495
495
The flag must be set before OpenCode starts — setting it inside an already-running session is too late. If OpenCode is launched by a desktop app, service manager, shell alias, terminal profile, or wrapper script, set the variable there and fully restart OpenCode.
496
496
497
+
### Workspace prerequisites
498
+
499
+
Worktree loops require a git repository with at least one commit. OpenCode scopes its instance to project `global` when started in a directory without a root commit, and worktree loop sessions created against a `global` project are invisible to the TUI. If you see a "No git commit in this project" error, create an initial commit and restart OpenCode.
500
+
497
501
## Docker Sandbox
498
502
499
503
Run loop iterations inside an isolated Docker container. Sandbox is optional: when Docker is available and configured, Forge provisions a loop container automatically; otherwise loops run in worktree-only mode.
@@ -503,6 +507,7 @@ See [Sandbox](_media/sandbox.md) for setup, Docker-in-Docker behavior, host netw
503
507
### Prerequisites
504
508
505
509
- Docker running on your machine
510
+
- OpenCode >= 1.15.5 — sandbox shell routing relies on the session-aware `shell.env` plugin hook. Enforced via `engines.opencode`, so older versions refuse to load the plugin rather than silently running sandbox commands on the host. (Loops additionally require OpenCode >= 1.17.8 for workspace integration, see [Requirements](#requirements).)
|`/review-plan`| Review a completed implementation against its original plan. |`auditor`| yes |
43
43
|`/execute-plan`| Start an iterative development loop in a worktree (or launch the plan in a fresh standalone session with `mode: new-session`). |`code`| no |
44
-
|`/execute-goal`| Execute a goal directly in the invoking session inside an isolated worktree, with fresh auditor sessions until no findings remain. |`code`| no |
44
+
|`/execute-goal`| Execute a goal in rotating dedicated code and auditor sessions inside an isolated worktree. |`code`| no |
45
45
|`/loop-status`| Check status of all active loops. |`code`| no |
46
46
|`/loop-cancel`| Cancel the active loop. |`code`| no |
Copy file name to clipboardExpand all lines: docs/api/_media/configuration.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,9 +100,10 @@ The written file is added to the worktree's git exclude so it never appears in `
100
100
101
101
Notes:
102
102
- The written file is ephemeral. Forge deletes its own `opencode.jsonc` before any teardown commit (and the whole worktree is removed on completion), so it can never land in loop history — even if the git-exclude write failed. A repository-tracked `opencode.jsonc` is never deleted (forge did not write it). Because the file is removed at teardown, a restarted loop is rewritten from the current `loop.worktreeOpencodeConfig`, so edits take effect on the next run.
103
-
- MCP servers declared here run as **host** processes from the worktree directory. When [Sandbox](sandbox.md) is enabled, only `bash`/`glob`/`grep` execute inside the container; the MCP commands themselves are not container-isolated.
103
+
- MCP servers declared here run as **host** processes from the worktree directory. When [Sandbox](sandbox.md) is enabled, only `bash`/`glob`/`grep` execute inside the container; the MCP commands themselves are not container-isolated. To run an MCP server *inside* the loop's sandbox container, use the placeholder below with a `docker exec -i` command.
104
+
- The string `{{FORGE_SANDBOX_CONTAINER}}` in any config value is replaced with the loop's sandbox container name (`forge-<loop>`) when the file is written. For loops without a sandbox, `mcp` entries referencing the placeholder are dropped instead, so the same config works with and without the sandbox.
104
105
105
-
Example — expose Chrome DevTools MCP inside every loop:
106
+
Example — Chrome DevTools MCP running inside the loop's sandbox container (Chromium and `chrome-devtools-mcp` ship preinstalled in the sandbox image; see [Sandbox › Browser Testing](sandbox.md#browser-testing)):
106
107
107
108
```jsonc
108
109
{
@@ -111,7 +112,12 @@ Example — expose Chrome DevTools MCP inside every loop:
@@ -120,6 +126,8 @@ Example — expose Chrome DevTools MCP inside every loop:
120
126
}
121
127
```
122
128
129
+
Without the sandbox, a host-side server works too (Chrome runs on the host and cannot reach in-container dev servers): `"command": ["npx", "chrome-devtools-mcp@latest", "--isolated"]`.
130
+
123
131
## Group Launch
124
132
125
133
`groupLaunch` configures parallel feature orchestration (see the [`launch-group`](tools.md#group-tools) tool).
0 commit comments