- Downloaded binaries now work without a Go toolchain —
constructbinaries downloaded from a GitHub release no longer require a Go toolchain on the host.constructdis now embedded directly inside theconstructbinary at release build time and extracted into the Docker build context at runtime. Dev/local builds (viainstall.sh) continue to compileconstructdfrom source as before.
- dood: agent can now access Docker socket — the agent user (running as host UID:GID) was not a member of the docker group inside the container, so
dockercommands failed with permission denied. The daemon now reads the GID of/var/run/docker.sockand adds it to the session container viaGroupAdd.
- Linux only — README now clearly states macOS and Windows are not supported.
- Remove accidentally committed build binaries (
construct,constructd) and add.gitignore. - Add release pipeline (
.github/workflows/release.yml) — triggers on GitHub release publish, builds linux/amd64 and linux/arm64 binaries, uploads them as assets, copies[Unreleased]changelog content as release notes, and commits the changelog update back to main.
Full rewrite. v1.0.0 is a ground-up reimplementation and shares no code with the v0.x series. The architecture, wire protocol, session model, file layout, and container design are all new. See SPEC/ for the full design.
- Persistent daemon — a
constructddaemon runs in its own Docker container and manages all sessions. Sessions survive CLI restarts, host reboots (unless-stoppedrestart policy), and daemon restarts. The CLI communicates with the daemon over a Unix socket using newline-delimited JSON. - Named sessions per folder — each folder gets one session. Running
constructfor the same folder a second time attaches to the existing session rather than creating a new one. - Agent layer volume — each session has a persistent Docker volume at
/agentinside the container. Tool installs, home directory, shell history, and build caches all persist across container restarts and image rebuilds. The volume is only removed onconstruct destroyorconstruct purge. - Host UID:GID exec — all agent operations run as your host user's UID:GID. Files written to the bind-mounted repo have correct ownership on the host with no idmap or user-namespace remapping.
- Passwordless sudo — the agent can run
sudo apt-get installto install system packages on demand. - Repo mounted at its exact host path — the repo is mounted at its real absolute path (e.g.
/home/user/src/myrepo) rather than/workspace. Git worktrees, absolute path references, and multi-repo sessions all work correctly. - Host opencode config shared into container — your opencode models, skills, slash commands, and AGENTS.md are bind-mounted into the session container so the agent has the same global configuration as if it were running directly on your machine.
- Credential management —
construct config cred set/unset/liststores API keys in.envfiles under~/.config/construct/credentials/. Credentials are sourced into the container at startup — never passed as Docker env vars. dotnetstack — .NET 10 SDK.--stack dotnet.gostack — Go toolchain.--stack go.rubystack — Ruby + Bundler + Jekyll.--stack ruby.base-ui/dotnet-uistacks — Playwright MCP + Chromium for browser automation.- Base-first image building — when a child stack image is needed but its base does not exist yet, the daemon builds the base automatically first.
construct ls/attach/stop/destroy/logs— full session lifecycle commands.
The entries below are from the v0.x implementation, which was a single-process CLI that managed containers directly. They are preserved for reference only.
- Auto-port fallback for serve mode — when
--serve-portis not specified and the default port (4096) is already in use on the host,constructnow automatically picks the next free higher port instead of failing. A yellow diagnostic is printed to stderr:construct: port 4096 is already in use; using port 4097 instead. If--serve-portis specified explicitly, no fallback occurs.
- Session history now scoped per project — previously, opencode's session database (
opencode.db) was stored inside a global Docker volume (construct-auth-opencode) that was shared across all repos. This meant the session list showed sessions from every project regardless of which repoconstructwas launched for. The fix replaces the directory volume mount with a file bind-mount of onlyauth.json(from~/.construct/opencode/auth.jsonon the host). The session database now lives in the per-repo home volume and is isolated to the current project. OAuth tokens inauth.jsonremain global (shared across repos, survive--reset) so users still only need to authenticate once. Note:opencode.dbis now wiped by--resetalong with the rest of the home volume. - opencode health check timeout after auth.json bind-mount — when Docker bind-mounts a file into a container, it auto-creates any missing parent directories as root. After switching to the
auth.jsonfile bind-mount,/home/agent/.local/,.local/share/, and.local/share/opencode/were created root-owned, so opencode could not write itsbin/directory or.local/state/siblings and crashed immediately. The fix pre-creates the parent directory (/home/agent/.local/share/opencode/) in the tool image Dockerfile as theagentuser — Docker's bind-mount then finds the directory already present and does not recreate it. Requires a one-time--rebuildto pick up the updated image. - Health-check timeout now shows container logs and recovery hints — previously, when the opencode server failed to start in serve mode, the only output was
server did not become ready: timed out after 15s waiting for …, with no indication of why it failed or what to do. On timeout,constructnow retrieves and prints the container's stderr/stdout (which almost always names the root cause directly, e.g. anEACCESerror or a missing API key), followed by actionable recovery hints: try--rebuildif opencode just updated,--resetif the home volume is corrupt or stale, or--debugto inspect the container interactively.
- Serve mode —
construct runnow startsopencode serveheadlessly inside the container (docker run -d) and connects a local client from the host. The local client isopencode attach <url>whenopencodeis on$PATH, or the system default browser as a fallback. This eliminates TUI-in-container rendering issues and lets users interact through their own local opencode setup. - Headless mode — when passthrough args are provided (
construct [path] -- "message"),opencode run --attach <url> <args...>is run locally instead of launching an interactive TUI. --serve-portflag — sets the port for the opencode HTTP server inside the container (default4096). Distinct from--port(application ports). Saved tolast-used.jsonand replayed byconstruct qs.- Pass-through args (
--) — bothconstruct [flags] [path] -- <tool-args>andconstruct qs [path] -- <tool-args>now forward everything after the bare--separator verbatim to the tool inside the container (e.g.construct qs -- continue-session <session-id>). Pass-through args are not persisted to last-used settings. Debug mode (--debug) ignores them. --clientflag — explicitly choose the local client that connects to the opencode server:tui(alwaysopencode attach; errors if opencode not on PATH),web(always opens browser directly), or omit for auto-detect (default:opencode attachif on PATH, browser otherwise).--client webis incompatible with passthrough args (headless mode requires opencode). Saved tolast-used.jsonand replayed byconstruct qs.
- Container startup "Permission denied" errors — the entrypoint script's heredoc that writes
~/.config/opencode/AGENTS.mdused an unquoted delimiter, causing the shell to treat backtick-wrapped paths (`/workspace`,`/home/agent`) as command substitutions. The delimiter is now quoted (<< 'AGENTSEOF'), preventing the errors/workspace: Permission deniedand/home/agent: Permission deniedon startup. - CI test suite timeout — CLI integration tests that invoked the
constructbinary without a subcommand (e.g.--port 3000 --port 8080or bare--) would reachrunner.Run, which blocks trying to connect to Docker on the GitHub Actions runner, causing the 10-minute test timeout to be hit with no output. Fixed by: (1) adding a 30-second context timeout to therun()test helper so any hanging subprocess fails fast with a clear message; (2) changing the affected tests (TestPortFlag_MultipleAllowed,TestPassthrough_DoubleDashSeparatesToolArgs,TestPassthrough_FlagsBeforeDoubleDash) to pass--help, which exits immediately after flag parsing; (3) simplifyingTestPassthrough_QsDoubleDashto use a repo with no last-used entry soqsexits before reachingrunner.Run. --docker doodpermission denied — the agent user inside the container was added to adockergroup baked into the image, but that group's GID rarely matches the host's Docker socket GID, causingpermission deniedwhen accessing/var/run/docker.sock.runnernow stats the socket at startup, reads its GID, and passes--group-add <gid>todocker runso the agent user gains access to the socket regardless of how the host system assigns Docker group IDs.--docker doodSELinux permission denied — on SELinux-enforcing hosts (Fedora, RHEL, etc.),:zrelabeling is insufficient for Unix sockets; the kernel denies access regardless of GID. DooD containers now pass--security-opt label=disableto disable SELinux confinement for the agent container, which is the correct fix for socket access. The:zsuffix has been removed from the socket mount as it is redundant when label enforcement is disabled.
- copilot tool support dropped —
opencodeis now the only supported tool. Thecopilottool registration, itsGH_TOKENauth requirement, and all copilot-specific home-file seeding have been removed. Seedocs/adr/002-opencode-as-sole-tool.md.
- Richer agent context in AGENTS.md — the generated
~/.config/opencode/AGENTS.mdnow includes a Workspace section (explaining that/workspaceis the user's repo, bind-mounted and immediately visible) and an Isolation section (explaining that the rest of the container is isolated, and that/home/agentpersists across sessions via a named volume).
rubystack —construct-base+ Ruby (system package), Bundler, and Jekyll. Use--stack rubyfor Jekyll sites and Ruby projects.ruby-uistack —construct-ruby+@playwright/mcp+ Chromium. Use--stack ruby-ui --mcpfor Jekyll/Ruby projects that also need browser automation.- Global opencode slash commands — when
~/.config/opencode/commands/exists on the host, it is automatically bind-mounted read-only into the opencode agent container. Custom slash commands defined globally on the host are now available inside the container without any extra flags. --versionflag — prints the construct version (e.g.construct v0.6.0) and exits. Reportsconstruct devwhen built without ldflags.- ARM64 support for the
gostack — thegostack Dockerfile now usesTARGETARCHto select the correct Go tarball, soconstruct-gobuilds correctly on bothlinux/amd64andlinux/arm64hosts. - Automatic image rebuild on version mismatch — stack and tool images are now stamped with an
io.construct.versionlabel at build time. On startup, construct compares the label against the running binary version and automatically rebuilds any stale image (one built by a different version, or one that predates this feature and carries no label). Dev builds (no ldflags version) skip the check entirely so local iteration is unaffected.
--stackdefault corrected tobase— the default was incorrectly left asnode(a stack removed in v0.3.0), which would cause an error for users who omitted--stack. It now correctly defaults tobase.
- Changelog-driven release notes — the release pipeline now extracts the
## [Unreleased]block fromCHANGELOG.mdand uses it as the GitHub release body. After tagging, the changelog is automatically updated:[Unreleased]is renamed to the tag version with today's date, and a fresh empty[Unreleased]block is inserted above it. The commit is pushed back tomainbygithub-actions[bot].
- Agent commits now carry the host user's real git identity instead of the
synthetic
construct agentidentity. Author and committer are resolved independently using git's own precedence:GIT_AUTHOR_*/GIT_COMMITTER_*host env vars take priority, thengit config user.name/user.email, then the committer falls back to the author (matching git's default behaviour). The synthetic fallback (construct user <user@construct.local>) is only used when no author identity at all is available on the host, and triggers a warning.
--dockerflag — selects Docker access mode for the agent container.--docker none(default) starts no sidecar and sets noDOCKER_HOST, following the principle of least privilege.--docker doodbind-mounts the host socket (/var/run/docker.sock) for Docker-outside-of-Docker access.--docker dindstarts an isolated privilegeddocker:dindsidecar (previous default behaviour). The mode is saved in~/.construct/last-used.jsonand replayed byqs. The injectedAGENTS.mdnetworking section is tailored to the active mode.dotnet-bigstack — newconstruct-dotnet-bigimage extendingconstruct-basewith the .NET 8, 9, and 10 SDKs installed side-by-side. Use when a project targets multiple .NET generations or must verify cross-version compatibility.dotnet-big-uistack — newconstruct-dotnet-big-uiimage extendingconstruct-dotnet-bigwith@playwright/mcpand Chromium. Use with--mcpfor projects that need multi-version .NET support and browser automation in the same session.
- Static
dindnetwork alias — the dind sidecar now registers the aliasdindon its session-scoped bridge network.DOCKER_HOSTis alwaystcp://dind:2375, matching the hostname already documented in the injectedAGENTS.md. This makes the alias real rather than implied and keeps it stable across sessions.
dotnet/dotnet-uistack —libicu70is now installed in the image, resolving a runtime crash when .NET applications use globalization (ICU mode). Previously .NET would abort on startup withCouldn't find a valid ICU package.
--portflag — publish container ports to the host. Repeatable; accepts any formatdocker run -psupports (3000,9000:3000,127.0.0.1:3000:3000). A bare port number is automatically expanded tohost:container.--mcpflag — activate MCP servers at container startup. When passed, the entrypoint writes~/.config/opencode/opencode.jsonregistering@playwright/mcp; without it the file is removed. Requires--stack uior--stack dotnet-uifor full browser automation support.dotnet-uistack — newconstruct-dotnet-uiimage combining the .NET 10 SDK with@playwright/mcpand Chromium. Extendsconstruct-dotnet; use with--mcpfor Blazor/ASP.NET projects that need browser automation.- Automatic AGENTS.md injection — the entrypoint always writes
~/.config/opencode/AGENTS.mdso opencode knows it is running inside a construct container. When--portis used the file also contains server binding rules (bind to0.0.0.0, use the ports listed in$CONSTRUCT_PORTS), preventing the common mistake of agents starting dev servers on127.0.0.1which is unreachable from the host. - Networking context in AGENTS.md — the injected file now always explains that Docker runs on a separate sidecar host (
dind), notlocalhost. Containers started via Docker are reachable atdind:<port>, not127.0.0.1. Also clarifies that the user can access ports on the agent machine directly but not ports inside Docker containers, so agents should run services on the machine itself. OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT=true— injected into the opencode container to prevent unwanted clipboard interference from terminal text selection.CONSTRUCT=1env var — always injected into the agent container so tools can detect they are running inside construct.CONSTRUCT_PORTSenv var — injected when--portis used; contains the comma-separated list of container-side port numbers.qsnow replays--mcpand--port— the quickstart command restores the full previous invocation, not just--stack.~/.construct/last-used.jsonnow storesmcpandportsalongsidestack.install.sh— convenience script that builds the binary from source and installs it to~/.local/bin/construct.
- Stack consolidation —
nodeandpythonstacks are removed. Python 3, pip, and venv are now included in thebaseimage alongside Node.js 20. Theuistack now extendsbasedirectly. Any invocation using--stack nodeor--stack pythonshould switch to--stack base(or a more specific stack). - Default stack changed from
nodetobase— reflects the consolidation above. - MCP activation decoupled from stack —
@playwright/mcpis installed in theuianddotnet-uistack images at build time but is only activated at runtime when--mcpis passed. Previously the MCP config was seeded unconditionally into the home volume.
qssubcommand — replays the last--tooland--stackused for a given repo. Settings are stored atomically in~/.construct/last-used.json(mode0600), keyed by absolute repo path. A failure to save is logged as a warning and never aborts the run.gostack — newconstruct-goimage extendingconstruct-basewith Go 1.24.uistack — newconstruct-uiimage extendingconstruct-basewith@playwright/mcpand Chromium installed at build time, enabling browser automation for front-end work.--resetflag — wipes and re-seeds the per-repo agent home volume before starting. Useful when home volume contents are stale. Does not affect the global auth volume or rebuild images.- Global auth volume (
construct-auth-<tool>) — opencode OAuth tokens are stored in a named Docker volume that is shared across all repos and is not wiped by--reset. Previously tokens lived inside the per-repo home volume and were lost on reset or when switching repos. - Home volume labelling — all construct-managed volumes are labelled
io.construct.managed=truesodocker volume prunedoes not silently remove them. - SELinux support — secrets bind mount now carries the
:zrelabelling suffix, allowing construct to run on Fedora, RHEL, and other SELinux-enforcing hosts.
- Secrets temp directory is now explicitly removed on
SIGINT/SIGTERM. Previouslyos.Exitbypassed deferred cleanup, leaving credentials on disk until the next run. .construct/.envis added to.gitignoreto prevent accidental credential commits.
Initial release.
- Run AI coding agents (
copilot,opencode) inside isolated Docker containers with Docker-in-Docker. --tool,--stack,--rebuild,--debugflags.- Stacks:
base,node,python,dotnet. construct config set|unset|list [--local]— manage credentials in~/.construct/.envor a per-repo.construct/.env, injected into the container via bind-mounted secret files (notdocker run -e).- Per-repo persistent home volume (
construct-home-<tool>-<hash>) preserving shell history, tool caches, and seeded config files. - Testcontainers works out of the box.