Workspace Locations
A Workspace Location is a named source on one of your connectors: a folder path, a git URL, or both. Choose a location for a task, feature, or conversation to connect it to that source.
What a location is
Each location combines a connector, a name you choose, and a folder path, git URL, or both. Locations belong to you and are visible only to you. They aren't tied to a single project, so the same location can be reused across projects, features, tasks, and conversations.
When a connector is activated, Melius automatically creates a location named Home for it, pointing at the home folder of that computer. You can use it right away or rename it.
Because a location identifies a connector, an agent's file and command access follows the location of the task it is working on — not the connector the agent itself runs through. See the Managed Agents docs for details.
Creating a location
Open Locations in the Workspace section of the left navigation and choose to add one.
- Pick one of your connectors. You can only use connectors you activated yourself. The connector must be online to browse its folders.
- Browse the connector's file system and select a folder, enter a git URL, or both. At least one is required.
- Give the location a name.
Sources and instances
A location is a source: where code comes from. It has a folder path, a git repository URL, or both. The directory a feature or task actually works in is its instance, which is either the source folder itself, a git worktree of it, or a fresh clone. Features and standalone tasks show their instance path and link back to the source location. Tasks inside a worktree or clone feature get their own worktree of the feature's instance; tasks in a shared feature use the same folder.
Git repositories
When you select a folder, Melius checks it for a git repository and pre-fills the git URL from its origin remote. When a project is selected, the detected default branch is shown with a Use as project base branch button; select it to set the project base branch. You can edit the URL or enter one by hand. Melius stores no credentials; cloning uses the git and ssh setup on the connector's computer.
Strategies
- Shared — work happens directly in the source folder. This requires a source folder path that exists on the connector.
- Worktree — the feature or task gets its own git worktree and branch, named after it, created from the base branch.
- Clone — the feature or task gets a fresh clone of the git URL. Clone requires a git URL.
| Location | Shared | Worktree | Clone |
|---|---|---|---|
| Existing folder, no repository associated | Yes | No | No |
| Existing folder, repository associated by URL or detection | Yes | Yes | No (never into an existing folder) |
| Git URL only, no folder path | No | No | Yes |
| Repository associated, folder path does not exist | Allowed, but unusable until the folder exists | No, until the folder exists | Yes, with a git URL |
With no repository associated, shared is the only allowed strategy and requires an existing folder to run. Clone is never allowed when the specified path already exists, and always requires a git URL.
A project's Workspace settings set a default strategy and base branch (empty means the repository default). The default is applied when you pick a location if it is valid for that location; otherwise you must choose a valid strategy before saving. It is a default only and can be changed per feature or standalone task. Tasks inside a feature use its location: tasks in worktree features use worktrees, tasks in clone features use worktrees of the clone, and tasks in shared features use the shared folder.
Workspace setup
When you create a feature or a standalone task, Melius runs a built-in setup step before the first lifecycle stage. It is not a stage you can edit. With the shared strategy there is nothing to prepare and the work is ready immediately, and the same is true for tasks inside a shared feature. With the worktree or clone strategy, Melius creates the git worktree or clone in the background. Creating or editing the item never runs git itself, so saving stays fast.
Setup is retried automatically with increasing delays if it fails. While it runs, a setup progress banner on the task, the feature, the task drawer and the mobile task view shows that setup is queued or in progress, and which attempt it is on. Agents can start the work once setup is ready.
A problem with the chosen location or strategy, such as a strategy that isn't valid for the location, fails setup immediately instead of retrying. Once the retries are used up, the banner shows the git error and agents cannot start the work until it is fixed. Agents themselves are not affected and keep working on other items. From the banner you can:
- Retry setup, which starts again with a fresh set of attempts.
- Edit location and strategy, then save, which also queues setup again.
Once an instance exists and is ready, or is still being created, its location and strategy can't be changed; the change is refused until you remove the instance. A failed or removed instance can be edited.
Strategy validation uses the repository information Melius has cached for the location, so creating and editing work doesn't wait on the connector. Melius refreshes stale information in the background, and a refresh can also be requested for a location through the REST API (POST /workspace-locations/:id/refresh-inspect).
Instance lifecycle
An instance has a status of provisioning, ready, failed, or removed. If creating it fails, the error is recorded on the instance and shown in the setup banner. You can remove an instance manually at any time with Remove instance in the Actions menu of a feature or task (it is hidden for shared instances and disabled while the instance is being created or another operation is running). Removal is refused if the folder has uncommitted changes, or if its branch has commits that are not merged into the target branch (or not pushed, when the completion strategy is push). Confirm Force remove to discard them anyway.
Per-task workspaces inside a feature
In a feature that uses the worktree or clone strategy, every task gets its own worktree, created from the feature's branch on a branch named after the task. Tasks work independently and do not disturb each other or the feature's own folder. When a task is completed, Melius rebases its branch onto the feature branch, fast-forwards the feature branch, and then cleans up the task's worktree according to the cleanup policy. Integrations into the same feature happen one at a time, so tasks that finish together cannot race.
If the rebase hits conflicts, the task returns to To Do with the conflicting files and git output in its conversation, so the same agent can resolve them and finish again. If the feature's folder has uncommitted changes to tracked files, for example during planning, the integration is retried after a delay and, if it stays blocked, asks you what to do (see below). In a feature that uses the shared strategy, tasks work in the same folder as the feature and there is no integration step.
Completion strategy and cleanup policy
Two settings decide what happens to the work when a feature or a standalone task finishes. Both are set as project defaults in the workspace configuration, copied onto each feature and standalone task when it is created, and editable in the create and edit dialogs next to the workspace strategy. They can be changed until the matching step has run. Tasks in worktree or clone features merge into the feature branch as described above, and their cleanup follows the policy. Tasks in shared features have no integration step.
Create dialogs start with worktree, merge, and delete, unless project defaults supply other values. The REST API requires all three fields (workspaceStrategy, completionStrategy, and cleanupPolicy) when creating a feature or standalone task. On update, all three are required only if the request includes the location or any of those three fields; other updates can omit them. MCP uses worktree, merge, and delete when none are supplied and the location supports worktree; otherwise it falls back to shared, keep, and keep. If only the workspace strategy is supplied, MCP defaults to merge and delete for worktree, keep and keep for shared, or push and delete for clone. Explicit values take precedence and must form a valid combination.
Completion strategy
- Keep: leave the branch as it is.
- Merge: rebase the work branch onto the target branch, then fast-forward the target branch to it. No merge commits are created.
- Push: push the work branch to
origin. Melius does not open pull requests.
The target branch is the project's base branch (the repository default when empty). Merge and push require a git repository; they are not available for a plain folder. Shared instances allow only keep or push. Shared push pushes the source checkout's current branch to origin and fails if it has uncommitted changes. Shared keep does nothing.
Cleanup policy
- Delete: remove the worktree or clone folder. The branch is deleted only if it is merged into the target. Removing a clone deletes its directory and all local branches in it.
- Keep: leave the folder and branch in place. This is the only option for the shared strategy.
Delete is refused when the folder has uncommitted changes, or when the branch has commits that are not merged into the target (or not pushed, with the push strategy). Forcing the removal overrides this. An unmerged branch whose only copy is in a clone is lost when that clone is removed.
Git merge, Git push and workspace cleanup steps
Every feature and standalone task has two built-in steps at the end of its lifecycle, shown in the lifecycle view and stage progress. They are not editable and apply to every lifecycle. The first step is labelled by the completion strategy: Git merge or Git push, or Skipped for keep. The second is Workspace cleanup (Skipped for keep). Statuses read Not started, Running, Done, Failed or Skipped. The completion step runs first, then workspace cleanup, just before the work is marked done. Steps that never ran for the work (older work finished before they existed, or an instance you removed by hand without running them) are hidden, and a manual removal shows Workspace cleanup as Done (manual). A feature that is archived without being completed, and a standalone task that is cancelled, run workspace cleanup only.
Git merge or Git push for a worktree or clone, shared push, and cleanup that deletes an instance fail on uncommitted changes (unstaged, staged, or untracked files). Shared keep and cleanup keep do nothing. The completion step also fails on rebase conflicts, a branch that can no longer be fast-forwarded, or a rejected push. A failure is recorded with an error and a comment in the conversation, and the status and error show on the feature or task.
- Feature: a Git merge or Git push failure that an agent can resolve sends the feature back to the design stage and wakes the planner, who resolves the problem or delegates it to a task. The feature then goes through the final steps again.
- Standalone or in-feature task: a completion failure that an agent can resolve returns the task to To Do so an agent can resolve the problem and finish again.
- Workspace cleanup: a failed cleanup does not hold the work back. The work is marked done, the error is recorded and commented, and you can retry the cleanup or force-remove the instance.
The instance banner offers Retry for a failed Git merge, Git push or workspace cleanup step.
When Melius asks you instead
Untracked files in the target checkout are allowed. If an incoming file collides with an untracked file there, the merge fails and Melius returns the work to an agent with the conflicting files: the planner for a feature, or an implementation agent for a standalone or in-feature task.
If the target checkout has staged or unstaged changes to tracked files, is on the wrong branch, or push credentials are missing, Melius pauses the work and asks you to resolve the problem through a feedback request. You can answer Retry after I fix it, switch the completion strategy to keep or push, or skip the step. The request appears in the Feedback Requests page and in the work's conversation.
Project workspace configuration
In a project, open the Actions menu in the header. It contains Edit project, Edit workspace configuration, and Delete project. The workspace configuration dialog sets the project's default workspace location, its default workspace strategy, and its base branch. The default location pre-fills the picker for new features, and the strategy, base branch, completion strategy and cleanup policy are the defaults described above.
Creating tasks and features
Tasks and features are created from the same dialogs everywhere: the + New menu, the Tasks page, and a project's feature and task lists. Each dialog has the location picker and, when a location is chosen, a strategy picker pre-filled from the project default. The dialog can't be submitted while the strategy is invalid for the location. A task created inside a feature shows no strategy picker, because it uses the feature's location and its task workspace is determined by the feature's strategy. Worktree features give each task a worktree, clone features give each task a worktree of the clone, and shared features use the same folder for their tasks.
Editing and uniqueness
Only the name of a location can be changed after it is created. To point at a different connector or folder, delete the location and create a new one.
Each connector and folder combination can only be saved once per user. Trying to create a second location for the same connector and folder is rejected. Names are just labels, so two locations may share a name.
Deleting a location
A location can't be deleted while anything still uses it. Deletion is blocked if the location is set on a feature, a task, a project's default location, or a chat session. Change or clear those references first, then delete the location.
Where locations are used
- Tasks and features — every new task and feature requires a location, whatever its type. You can change a task's or feature's location before setup or after setup fails or the instance is removed.
- Project default location — set in the project's workspace configuration (Actions menu). It pre-fills the location picker when you create a feature in that project. It is a convenience only; it is never applied to existing work automatically.
- Chat sessions — a conversation can have a location that sets the folder it works in.
How the picker pre-fills
You can always change the pre-filled choice. The picker starts with:
- For a new task, its feature's location, if the feature has one.
- For a new feature, its project's default location, if the project has one.
- Otherwise, your only location, if you have exactly one. If you have several, choose one yourself.
Tasks and features that existed before locations were introduced keep working. Where Melius could match an older folder to exactly one of your connectors it was converted into a location automatically; any that couldn't be matched have no location until you choose one.