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
Mount repo at its exact host path instead of /workspace
On Linux and macOS the repo is now bind-mounted at its real absolute
path (e.g. /home/user/src/myrepo) with the container workdir set to
match. This makes git worktrees work correctly — git stores absolute
host paths in worktree metadata, which now resolve identically inside
the container. It also allows running construct against multiple repos
or worktrees simultaneously without path conflicts.
CONSTRUCT_WORKSPACE_PATH is injected as an env var and expanded into
~/.config/opencode/AGENTS.md at container start so the agent knows
which directory is shared. On Windows Docker Desktop cannot mirror host
paths into the Linux VM, so /workspace is kept as a fallback.
Requires --rebuild to pick up the updated entrypoint in the tool image.
Generated by construct
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Changed
6
+
-**Path mirroring: repo mounted at its exact host path** — the container no longer mounts the repo at the fixed path `/workspace`. On Linux and macOS the repo is now mounted at its real absolute path (e.g. `/home/user/src/myrepo`), and the container's working directory is set to that same path. This makes git worktrees work correctly (git stores absolute host paths in worktree metadata, which now resolve identically inside the container), and allows running `construct` against multiple repos or worktrees simultaneously without path conflicts. The agent is informed of the shared path via the `CONSTRUCT_WORKSPACE_PATH` environment variable, which is expanded into `~/.config/opencode/AGENTS.md` at container start. On Windows, Docker Desktop cannot mirror host paths into the Linux VM, so the previous `/workspace` fallback is retained.
Copy file name to clipboardExpand all lines: docs/spec/global-commands.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
OpenCode loads custom slash commands from two locations:
6
6
7
-
-**Per-project:**`.opencode/commands/` in the repo root (already works — the repo is bind-mounted at `/workspace`)
7
+
-**Per-project:**`.opencode/commands/` in the repo root (already works — the repo is bind-mounted at its exact host path)
8
8
-**Global:**`~/.config/opencode/commands/` in the user's home directory
9
9
10
10
The construct agent container has an isolated named Docker volume for `/home/agent`, so the host's `~/.config/opencode/commands/` directory is never visible to the agent. Global slash commands defined on the host are silently absent.
0 commit comments