Skip to main content
Every AI agent in Agentastic works inside its own isolated environment. Isolation means that multiple agents can edit code simultaneously without stepping on each other, and you can discard an agent’s work without affecting anything else. Agentastic supports two isolation modes: git worktrees and Docker containers.

Git worktrees

What is a worktree?

A git worktree is a linked working copy of your repository. Unlike switching branches (which changes files inside a single directory), a worktree gives each branch its own complete directory on disk. Your main workspace stays untouched while an agent works in its own copy.
Worktrees give you:
  • No file conflicts — each agent edits its own copy of your files.
  • True parallel work — multiple agents run simultaneously without waiting for each other.
  • Easy comparison — diff the agent’s branch against yours at any time.
  • Safe experimentation — delete a worktree if you don’t like the result, with no impact on main.

Worktree storage locations

Configure where Agentastic creates worktrees in Settings > Agents:

Creating a worktree

1

Open Agent Home

Click the Home icon in the Navigator sidebar.
2

Write your prompt and set a branch name

Enter your task and choose a branch name. A random suggestion is provided.
3

Click Send

Agentastic creates the worktree automatically before launching the agent.

Switching between worktrees

You can also click directly on any worktree in the Agents tab of the Navigator (Cmd+4).

Removing a worktree

  • From Settings — open Settings > Agents, right-click the worktree, and select Remove.
  • From the terminal — run git worktree remove path/to/worktree.
  • Clean up stale references — run git worktree prune after manual deletion.

Docker containers

For maximum isolation, you can run agents inside Docker containers. Each container has its own filesystem, network stack, and pre-installed tooling, with your worktree mounted at /workspace.

Enabling containers

1

Install Docker Desktop

Download and install Docker Desktop. Start it and wait for it to finish initializing.
2

Open Agent Home

Click the Home icon in the Navigator sidebar.
3

Switch mode to Container

Toggle Mode from “Worktree” to “Container”.
4

Select a container image

Choose a pre-defined image or enter a custom one.
5

Launch

Click Send. Agentastic pulls the image if needed and starts the container.

Available images

Container mounts

Agentastic automatically mounts the following paths into every container:

Network modes

Change the network mode in Settings > Agents > Network Mode.

All built-in agents

Agentastic ships with 33 built-in agent definitions and auto-discovers them when their CLI is installed and available in your PATH.

Custom agents

Add any terminal-based AI agent in Settings > Connections. The command must accept a prompt (either as an argument or interactively).

Agent lifecycle

From launch to cleanup, every agent follows this lifecycle:

Best practices

Use descriptive branch names

Names like feature-user-auth, fix-login-bug, and refactor-api-client make it clear what each agent is working on when you have several running in parallel.

One task per agent

Keep each agent’s scope focused. Rather than asking one agent to “build the whole feature,” split it into:
  • “Add the database schema for users”
  • “Create the API endpoints”
  • “Build the frontend components”

Always review before merging

Before merging any agent’s work:
  1. Open the Diff Viewer to inspect changes.
  2. Run AI code review for automated feedback.
  3. Test the changes in the agent’s environment.
  4. Confirm there are no regressions.

Clean up regularly

Remove old worktrees to free disk space, keep the agent list manageable, and avoid branch name conflicts. Use Settings > Agents or run git worktree prune in the terminal.

Troubleshooting

A branch can only exist in one worktree at a time. Either remove the existing worktree that has the branch checked out, or choose a different branch name for the new agent.
  1. Verify Docker Desktop is running.
  2. Check that the image exists locally: docker images.
  3. Review container logs in Settings > Agents.
Agentastic discovers agents by scanning your PATH. Ensure the agent CLI is:
  1. Installed globally (not just locally in a project).
  2. Accessible in your PATH — confirm with which <agent-name>.
  3. Executable (chmod +x if needed).