Using the workspace
Tasks working together
How Dus tasks in one project see and message each other, claim files before editing, share ports and numbers, wait for merges, and the Team view that shows it all.
You can run many tasks in one project at once: one fixing a bug, one building a feature, a scheduled job, a task in the terminal. Each usually works in its own worktree, so they can't overwrite each other's files on disk. They can still clash: two tasks changing the same function, both adding migration number 12, both installing packages, both starting a dev server on the same port. Dus tasks coordinate so that doesn't happen.
Open Team in the sidebar to see it.
What tasks do for each other
| What happens | |
|---|---|
| See each other | When a task starts, Dus is told which other tasks are working, on which branch, on what, and which files they claimed or changed. |
| Claim before editing | Before changing files another task might touch, Dus claims them (files, folders or single functions). Another task's edit to a claimed file is held back before it happens, never silently overwritten. |
| Spot clashes early | Dus is warned when a change touches a file another task changed but hasn't merged, a file that depends on one (from the repository index), the same lockfile, the same migrations folder or a generated file. |
| Message each other | Tasks can ask and tell each other things ("are you changing the login form?"). Replies are threaded. |
| Share resources | Ports, migration and decision numbers and locks (a test database, seed data) are reserved, so two tasks never take the same one. Package installs and migration commands take the project's install or migrations lock by themselves. |
| Wait and merge in order | A task can wait for another to merge, finish or free some files, and carry on by itself when it does. When a task merges, every task whose work overlaps is told to bring the base branch in first. |
| One writer in the main checkout | Only one task at a time changes files in the project folder itself. Others there can still read; isolated tasks are never held up. |
When a task's edit is held back, Dus chooses what to do: wait for the other task, agree a split by message, do other work first, or ask you. If you say go ahead, Dus shares the claim, which always asks you first.
Messages are not you
A message from another task appears in the chat as a card, From Billing page, never as your words. It carries no authority:
- It can't approve anything. If another task asks Dus to run a command, Dus asks you before running it, whatever your permission mode, and the approval says which task asked.
- A task can't ask another to do what it may not do itself. A task in Plan mode can't ask others to change files, and a command you declined in one task can't be requested from another.
- Secrets are masked in messages, the same way as everywhere else (vault).
Messages are short (up to 4,000 characters) and limited, so tasks can't talk in circles: a few a minute, two broadcasts per 10 minutes, and when two tasks exchange 10 messages in 10 minutes without settling it, Dus is told to stop and ask you. A message never wakes an idle task or spends money by itself; it is read at that task's next step.
The Team view
Team lists every task working in this project, including those started from the terminal or another window:
- Tasks: what each one is doing, its branch, the files it claimed (with a button to release a claim) and the files it changed that aren't merged yet. Its helper workers and parallel attempts are listed under it. Tasks that stopped show how long ago; one that stopped unexpectedly has its claims released automatically.
- Overlaps: where the work of two tasks meets, and why it matters.
- Reserved: ports, numbers and locks, with a Release button for anything stuck.
- Messages: what the tasks told each other, and who is waiting for whom.
- Merge order: which task should merge first when their work overlaps.
Releasing a claim or a reservation tells its task at its next step.
Built, planned, or being built
Before a task, Dus checks what is built on main (with its evidence), what is planned, and what anyone is building: pull requests, unmerged branches, other tools' worktrees, tasks and jobs, with who and how far. If it is being built, he never duplicates it silently: he waits, builds on their branch (asking you), builds the part that doesn't overlap, or takes over a forgotten branch, tells the builder the exact overlap and rebases when theirs lands. Migration and decision numbers are reserved above every branch's. Ask "what's the state of invoicing?" Team lists it under Being built elsewhere.
The project home
A new task opens on the project home, above the message box and the suggestions:
- The project: its name, branch, last activity and architecture.
- Continue where you left off: this project's tasks, Needs you first, then In progress, then Done but not finished. All projects and tasks opens the full list in Projects.
- Work in progress elsewhere: worktrees and branches with unmerged work from any tool, with the latest commit, how many files changed and how long ago.
Continue here on a worktree starts a Duscode task in that worktree instead of a new one. Nothing in it changes when you do: no branch is created or renamed, and deleting the task later leaves the worktree and branch as they were. Dus's first step reads the branch's recent commits and changes, so it picks up where the work stopped. It is refused while another task or Duscode window works there, and it asks first if files there changed in the last two minutes, since another tool may still be writing.
Things to know
- Everything is kept in
.duscode/coord/in your project, which is never committed. Nothing leaves your machine. - A task that stops unexpectedly is noticed at once on the same computer; a silent one after about 45 seconds. Its claims, locks and waits are released then. A task that comes back after a restart keeps its place.
- Claims expire after 2 hours without activity; editing a claimed file renews it.
- Workers and parallel attempts belong to their task: they never block each other or the task, and when a worker's work is merged its claims become the task's.