jackin load
Synopsis
Section titled “Synopsis”jackin load [SELECTOR] [TARGET] [OPTIONS]Load an agent into an isolated Docker container directly from the command line.
SELECTOR chooses the role (tool profile). TARGET chooses the workspace or path (file access boundary).
Arguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
SELECTOR | No | Role selector (e.g., agent-smith, chainargos/backend-engineer). When omitted, uses the last-used or default role for the workspace. |
TARGET | No | Path, path:container-dest, or saved workspace name. Defaults to the current directory. |
Options
Section titled “Options”| Option | Description |
|---|---|
--mount <SPEC> | Additional bind-mount spec. Repeatable. Format: path[:ro] or src:dst[:ro] |
--rebuild | Force rebuild the Docker image and refresh agent CLI install layers |
--role-branch <BRANCH> | Check out a specific branch of the role repository for local testing. See Testing a role branch below. |
--force | Acknowledge a dirty host working tree when materializing an isolated mount in non-interactive mode. Required only when (a) the workspace has at least one worktree-isolated mount and (b) the host repo’s tree has staged, unstaged-tracked, or untracked files. Ignored otherwise. |
--no-intro | Skip the animated intro sequence |
--debug | Print raw container output for troubleshooting |
--agent <NAME> | Override the launch agent (claude, codex, amp, kimi, or opencode). When omitted, a workspace default_agent wins first, a single-agent role uses its only runtime, and a multi-agent role prompts interactively. A non-interactive launch (no TTY) against a multi-agent role with no resolved choice errors out. |
Examples
Section titled “Examples”# Use workspace + last agent for current directoryjackin load
# Force fresh agent CLI install layersjackin load --rebuild
# Load a specific agent into current directoryjackin load agent-smith
# Load into a specific pathjackin load agent-smith ~/Projects/my-app
# Path with custom container destinationjackin load agent-smith ~/Projects/my-app:/app
# Load into a saved workspacejackin load agent-smith big-monorepo
# Workspace with additional mountsjackin load agent-smith big-monorepo --mount ~/extra-data
# Path with read-only additional mountjackin load agent-smith ~/app --mount ~/cache:/cache:ro
# Build and test a specific role branch locally before it mergesjackin load the-architect --role-branch feat/my-prWhat happens
Section titled “What happens”- Resolves the role and clones/updates its repository (or the specified branch when
--role-branchis set) - Validates the role repo contract (
jackin.role.toml+ Dockerfile) with strict manifest parsing - If the agent source has never been trusted, prompts the operator to review and confirm before proceeding (see Agent source trust)
- If
--role-branchis set, always prompts to confirm the branch is safe to build, regardless of the role’s trust status (see Branch trust gate) - Resolves the runtime agent from
--agent, workspacedefault_agent, a single supported role agent, or an interactive prompt for multi-agent roles - Checks resolved mounts for sensitive host paths (
~/.ssh,~/.aws, etc.) and prompts for confirmation if any are detected - Prompts for interactive environment variables declared in the manifest
- Generates and builds a derived Docker image, including declared Claude plugins (cached if unchanged; branch builds ignore
published_imageand always build from source) - Checks the local instance index for missing recoverable work in the same workspace or directory before creating a fresh runtime; matching-role restore candidates can be rebuilt from the prompt, and related role instances whose containers are gone can be recovered or rebuilt in place from the saved manifest source/ref. Running or stopped instances do not block a fresh launch.
- Creates a per-agent Docker network and DinD sidecar
- Launches the agent container with all resolved mounts and environment variables
- Runs runtime hooks if declared (
setup_once,source, thenpreflight) - Starts the selected agent CLI
Testing a role branch (--role-branch)
Section titled “Testing a role branch (--role-branch)”--role-branch lets you build and run a specific branch of a role repository locally before it merges to the default branch. This is the intended workflow for verifying a PR on a role repo (for example, checking that a Dockerfile change works end-to-end) without affecting your stable local image or other operators who may share the same role.
jackin load the-architect --role-branch feat/caveman-all-installWhat changes when --role-branch is set
Section titled “What changes when --role-branch is set”| Behaviour | Default | With --role-branch |
|---|---|---|
| Branch cached and reused | Default branch | The named branch — repeat loads of the same branch reuse the cached checkout |
| Image | Stable per-role image | Branch-specific image, fully isolated from the stable image |
| Concurrency with default-branch loads | Same role’s default-branch load may be blocked while the cache refreshes | Branch builds never block default-branch loads, and vice versa |
| Trust confirmation | First-use only | Always — regardless of the role’s trusted status |
| Forced rebuild | Pass --rebuild to refresh layers | Same — pass --rebuild to refresh layers |
The branch image is completely separate from the default-branch image. Running jackin load the-architect after a branch build still uses the unchanged default-branch image.
Branch names with slashes (feat/my-pr) and dashes (feat-my-pr) are kept distinct, so loading both never reuses the same image or cache slot by mistake.
For choosing between a fresh instance and another agent session inside an existing instance, see Parallel Agents.
Branch trust gate
Section titled “Branch trust gate”Every --role-branch load triggers an interactive confirmation, even for roles you have already trusted:
!! Unreviewed branch — verify before proceeding !!
role: the-architect source: https://github.com/jackin-project/jackin-the-architect.git branch: feat/caveman-all-install
This branch has not been merged to the default branch. Its Dockerfile and scripts may differ from the trusted main branch. A malicious contributor could introduce harmful code that runs on your machine during the image build.
Review the branch diff in the role repository before continuing.
Have you reviewed branch "feat/caveman-all-install" and verified it is safe to build? [y/N]This gate exists because trusted = true in your config covers the default branch of a role, not every PR branch an external contributor might open against it. See Branch trust gate for the full threat model.
--role-branch requires an interactive terminal. Non-interactive contexts (CI, scripts) will exit with an error — this is intentional.
Combining with --rebuild
Section titled “Combining with --rebuild”--role-branch alone does not bust the Docker layer cache. If you push new commits to the branch and want a clean rebuild:
jackin load the-architect --role-branch feat/my-pr --rebuildDirty-host acknowledgement (--force)
Section titled “Dirty-host acknowledgement (--force)”When a workspace mount has isolation = "worktree", jackin load materializes a new git worktree from the host repo’s current HEAD before starting the container. If the host tree is dirty (staged changes, unstaged tracked changes, or untracked files — ignored files do not count), those edits stay on the host and are not carried into the agent’s worktree.
In an interactive shell jackin’ prompts you to confirm before materializing. In non-interactive contexts (CI, scripts, piped input) the launch fails fast unless you pass --force to acknowledge that:
- the worktree branches from
HEAD, not from your working copy - uncommitted host edits will not appear inside the container
--force does not:
- discard, stash, or commit any host changes
- relax any other validation (sensitive mounts, mid-rebase host repo, readonly worktree mounts, nested isolated dst paths still hard-error)
- affect
sharedmounts or workspaces with no isolated mounts