Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ services:
retries: 60
platform:
profiles: [platform]
# Runs and conversation workspaces store the platform host that owns them
# (`runs.workspace_host`, taken from os.Hostname()). A container's default
# hostname is its container ID, so pin it: otherwise every recreation (an
# upgrade, `./start.sh pull`, an image or service change) makes earlier
# workspaces look owned by another execution host, and approval, terminal
# and Agent browser calls fail with a workspace-binding or control-channel
# error. Keep this value stable across upgrades and operator overrides.
hostname: loopforge-platform
# Published release stack: never builds. Bump the pinned tag (here and in
# AGENTFLOW_ISOLATED_IMAGE) with each release; source builds use compose.dev.yaml.
image: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.4.0}
Expand Down
2 changes: 2 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ The Compose deployment mounts the host Docker socket into the platform container

Docker SOP nodes using a standard CLI executor first look for the CLI on the sandbox user's PATH. When it is missing, LoopForge uses a shared installation for the platform image where available or runs the same installer as conversation workspaces in the container. The install uses the sandbox's configured proxy, and later nodes in that container reuse the CLI. In-container installation requires a writable filesystem and access to the official package source. Read-only sandboxes can use a CLI from the image or the mounted toolchain. ZCode uses the official executable supplied by the image.

`compose.yaml` pins `hostname: loopforge-platform` on the platform service. Runs and conversation workspaces record the platform host that owns them (`runs.workspace_host`, taken from `os.Hostname()`), and a container's default hostname is its container ID. Without a pinned hostname, every recreate (`./start.sh pull`, an image change, `docker compose up`) makes existing workspaces look owned by another execution host: approval and control actions fail with a workspace-binding error, and the workspace terminal or Agent browser report the workspace execution host as unreachable or ask for `AGENTFLOW_CONTROL_TOKEN` even though one container serves both API and worker roles. Keep the pinned hostname stable across upgrades and Compose overrides, and give each separately deployed worker or execution host its own stable identity.

Access to the Docker socket is equivalent to root on the host. Two safeguards follow from that: the platform runs every task in a sandbox container, including SOPs configured for the `local` driver (`AGENTFLOW_LOCAL_SANDBOX=docker`), and only platform administrators can point a repository at a host source path. Even so, anyone who can run SOPs can execute code in containers on this host, so only give accounts to people you trust and do not expose the service to untrusted networks. Agent CLIs also apply a bound repository's own configuration as their native rules define, including unattended SOP runs: `AGENTS.md`/`CLAUDE.md` instructions, `.codebuddy/`, `.claude/settings.json` (hooks and environment) and `.mcp.json` can start commands or MCP servers inside the sandbox. Bind only repositories whose contents you trust. To run without the socket, remove the `docker.sock` volume and the `AGENTFLOW_LOCAL_SANDBOX` setting from `compose.yaml`, then connect a separate Docker-capable worker or execution machine for AI SOPs; the script-only welcome SOP then runs inside the platform container.

### Slow networks: clone and image build limits
Expand Down