Repositories

Git repositories give Agents access to the code needed for engineering Tasks. Anakin supports repositories owned by a Space and repositories attached directly to an Agent.

If the Agent only generates throwaway code and does not read an existing project, choose the No repository needed work mode when you create it. That mode does not bind a Git repository or a specified directory.

Repository selection

Use the two levels for different purposes:

  • Space repositories are the default code sources for work in that Space.
  • Agent repositories narrow or replace the defaults for one Agent.

When an Agent has repository bindings, its bindings are used for its runs. When it has none, Anakin falls back to the repositories configured for the Task's Space.

Add a Space repository

Open the Space's Git repositories & settings page. The page has two modules: Git repositories manages the repositories bound to the Space, and Git settings configures the commit identity (commit author name / email) for this Space — Inherit organization settings by default, switchable to any other source or a concrete value. The default Co-authored-by trailer switch is set here too and applies to this Space only.

Add:

  • the Git repository URL;
  • an optional description that helps People and Agents identify the codebase.

Repository management is limited to People with the required Space or Organization administration access.

Default branch

When you add a repository, you can optionally set a baseline branch. Temporary repository workspaces start from that branch; leaving it empty uses the remote default branch. Baseline branches can be configured for both Agent and Space repositories.

For the same repository URL, branch resolution is: an explicit checkout ref for the run > the Agent repository branch > the Space repository branch > the remote default branch. The Space branch is used only when the Agent entry has no branch; if no configured branch exists, the checkout falls back to the remote default.

Attach repositories to an Agent

Open the Agent and use its Repositories settings when:

  • the Agent should work only in a subset of the Space's repositories;
  • the Agent needs a repository that is not a Space default;
  • the Agent has a specialized role tied to one codebase.

Leaving the Agent repository list empty preserves the Space fallback.

Organization-wide Git settings

The Organization settings gain a Git repositories & settings entry under the Global configuration group. The page has two parts:

  • Global Git settings: the commit identity (commit author name / email) and the default Co-authored-by trailer switch for the whole organization; Spaces and Agents that do not set their own values inherit from here;
  • Per-Space repositories & settings: a collapsible panel listing the Git repositories and Git settings of each Space in My spaces (collapsed when there is more than one). The content matches the Space settings page, so you can manage every Space from one place instead of switching between them.

Access credentials

Repository configuration stores the source URL, but the run still needs valid Git access. Confirm that the Runtime environment can clone, fetch, and push as required.

Access may come from credentials available to the local service, an SSH setup, HTTPS credentials, or an Organization credential projection supported by the deployment. Use the least privilege needed for the Task.

Do not put repository tokens, private keys, or install tokens in a Task description, comment, Agent instruction, or Skill.

Create temporary directory

When Create temporary directory is selected, each run receives an isolated task directory. The local service can prepare repository worktrees from its cached repository data so several Tasks can work against the same source without writing to one shared directory.

This is the recommended mode for parallel code changes.

A run may still need network access to clone or refresh repository data. Repository size, network speed, and credential availability affect startup time.

Specified local directories

In Specified mode, the Agent uses a configured absolute local directory. When you save a Git folder, choose How should tasks use this folder? See Agent working directory for the full rules.

  • Run in isolated worktrees: each Task checks out its own git worktree and does not change the original folder. Tasks can run in parallel. Task results are delivered on <brand-product-id>-agent/<agent>/<task-identifier>; Agent Chat results are delivered on <brand-product-id>-agent/<agent>/<chat-session-id>. For HiFox, the prefix is hifox-agent; for Anakin, it is anakin-agent. Isolated mode supports one directory; Add path is hidden.
  • Run directly in this folder: the Agent reuses the repository and dependencies already present there and does not prepare a fresh copy for each Task. You can Add path after choosing this option.

Use running directly in the folder when:

  • the repository is very large;
  • the local environment has expensive generated state or caches;
  • the Task depends on local services or tools tied to that directory.

The configured directory must exist on the selected local Computer and be readable and writable by the local service. One in-place specified directory serves one run at a time. A non-Git folder can only run directly in the folder. The confirm button is Confirm.

Use Create temporary directory, or Specified with isolated worktrees, when several Tasks may change the same codebase in parallel.

Validate repository access

Before assigning a code-changing Task to an Agent, use a read-only check such as:

Inspect the repository and report the primary language, package manager, and closest test command. Do not change files. Cite the files that support each conclusion.

This verifies that the Agent can:

  • enter the expected directory;
  • read the intended repository;
  • use the configured Git access;
  • run basic inspection commands;
  • write a result back to the Task.

Troubleshooting

The Agent cannot find the code

Check whether the Agent has its own repository bindings. If it does not, verify the Task's Space repositories. For Specified mode, verify the configured absolute path on the selected Computer.

Clone or fetch fails

Test the repository URL and credentials in the same Runtime environment used by the local service. Confirm network access, SSH host trust where applicable, and repository permissions.

The wrong repositories are used

Agent bindings take precedence over the Space fallback. Remove an unintended Agent binding or attach the correct repository explicitly.

Parallel Tasks interfere with each other

Use Create temporary directory, or Specified with Run in isolated worktrees. If you need to run directly in the folder, add separate directories to the Agent's pool or keep the work sequential. See Agent working directory.