Agent working directory

The default working directory is an Agent run setting. It is the directory the Runtime enters when it executes work. It is not a Space Git repository and does not replace Agent or Space repository bindings.

Configure it in Agent settings under Run settings → Default working directory.

When you chat with an Agent, you can also override the working directory for that conversation without changing the Agent default. See Chat with an Agent.

ModeUse it when
Create temporary directoryYou are working on most code Tasks, need parallel execution, or want a separate workspace for each Task.
Specified directoryThe code is already on the Computer, the directory contains special dependencies or caches, or you need to reuse an existing directory.

Use Create temporary directory for most code Tasks. Use Specified directory only when the Agent must reuse an environment, dependency set, or cache that already exists on the Computer.

See Agent task execution for dispatch and run states. See Repositories for Git sources.

Create temporary directory

Each Task gets a separate temporary directory. Repository-backed runs prepare an isolated Git worktree so Tasks do not write into the same workspace. This makes the mode suitable for parallel work on the same codebase.

For example, one Agent can fix a sign-in issue while another Agent adds tests. Each Task uses its own worktree, modifies files, and runs commands without coordinating changes in one dirty directory.

After the Task finishes, review its worktree changes, then keep, merge, or discard them.

Specified directory

Runs use absolute paths that already exist on the Computer. This is useful when an environment, dependencies, or caches are already prepared on disk.

The directory is picked by clicking, not by typing a path: the field shows a "Click to choose a folder on this computer" placeholder, and clicking the field or its trailing button opens the picker. On the desktop app, choosing a folder on your own computer opens the native directory dialog (Browse); for any other computer, or from the web, a remote directory browser lists folders through that computer's local service (Choose…). An advanced entry still accepts a typed path; typing a bare drive letter such as E: completes to E:\ when the field loses focus.

On Windows you can point the working directory at a local drive root (for example E:\). Network locations and device paths (UNC, device paths, non-local volume roots), system directories, and home directories still cannot be used.

Switching such an Agent to a Runtime on another computer does not save directly. A Switch Runtime and working directory confirmation opens first: inside it you can re-pick the Runtime and the working directory, the directory's availability is probed asynchronously against the target machine and you are prompted to change it when it is not usable, and nothing applies until you save — the Runtime and the working directory then update together. The Agent settings drawer and the in-chat Runtime menu behave the same.

When you save a Git folder, choose How should tasks use this folder?:

  • 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: Tasks modify the original directory. The same real path usually allows only one Task at a time. You can Add path after choosing this option.

In isolated worktree mode, you can optionally set a baseline branch. The local service first attempts to fetch that branch from origin; if fetching fails, it still uses an already available matching local reference. Leaving it empty uses the literal HEAD as the worktree base and does not fetch a remote branch automatically.

You can add multiple directories only when running directly in the folder. New work prefers an idle directory, then the least busy one. If no directory is available, the run waits for a local directory. Isolated mode is not a multi-directory pool.

The same Task or conversation keeps its original directory. It does not switch while that path remains usable, even if the path is later removed from the default list.

Isolated worktrees and in-place runs are an Agent setting. Existing Tasks or conversations that already bound a directory continue with their original directory.

FAQ

Will existing Tasks move to a new default directory?

No. A Task or conversation keeps its original directory while that path remains usable. New Tasks and conversations use the updated default setting.

Does Specified directory modify the original folder?

It depends on the run style. Run in isolated worktrees leaves the original directory unchanged and delivers results on a Task branch. Run directly in this folder modifies the original directory directly.

Why is a Task waiting for a local directory?

All specified directories are temporarily unavailable. This commonly happens when multiple Tasks are using the same in-place path, or a directory on the Computer does not satisfy the run conditions. The Task resumes when a directory becomes available.

Can Git and non-Git directories be mixed?

Yes, but they cannot use isolated worktrees. Runs use the selected directories in place, and the product warns you about this when you save the setting.

How does the working directory relate to repository bindings?

The working directory decides where the Agent works; it is not the repository configuration. Git sources still come from Agent and Space settings. See Repositories.