Concepts
Budgets
Per-task and per-day limits ($10 and $20 by default). A task that needs more asks once before it starts; near its ceiling Dus writes a handover and asks once to carry on.
You pay your AI provider directly, so Duscode guards your money with two limits. Both are on every plan, Free included.
| Limit | Default | What it covers |
|---|---|---|
| Per task | $10 | One request to Dus, including the helper agents it uses |
| Per day | $20 | All tasks and projects on this machine, per UTC day |
Amounts are in US dollars, because providers price in dollars. If you show costs in pounds (Settings → General → Currency for costs), Duscode shows them as an estimate marked ≈.
What happens at the limit
- Before the task starts. Dus estimates what the task will cost from its size and from what the same kind of work cost in this project before. If that is above your per-task limit, it asks once, before spending anything: "This task looks like $3–$6 on Opus 5.5, above your $2 per-task limit. Allow up to $9?" Allow it and Dus works through without asking again; keep your limit and it works within it.
- Near the ceiling (90%). Dus finishes the step it is in (a change is either complete or undone, never half made), writes a short handover (what is done, the next step, the state of the checks) and asks you once: Carry on, up to $X, with what the rest should cost, or Stop here. If you stop, nothing is lost: the changes made so far stay, and you can undo them or continue with a new message.
- At 100%, if the step in hand ran past the ceiling, Dus asks the same one question if it hasn't yet, and otherwise stops with a summary of where things stand. The daily limit asks Raise to $X for today or Stop for today.
- If you don't answer for 10 minutes, Duscode reminds you once on your notification channels (desktop, Slack or Teams, in Settings → Integrations), with what it is waiting for and what it recommends.
Raise by itself while you're away
Settings → Budgets → Raise by itself up to lets a task that is going well raise its own budget, up to the amount you set and never above. It is off (0) by default. When it raises, the chat says so in one line: from what, to what, and why.
- It never goes past your amount: past it, Dus asks you as usual.
- It never raises on Duscode credits that are low or out; your balance decides there.
- Your daily limit still applies.
Giving one task more, while it runs
While a task with a budget runs, the top bar's status light (Working) opens its budget: what it has cost so far against its budget, for example $1.75 of $2. Click the light to give this task more without going to Settings:
- Click the status light in the top bar.
- Choose +£1, +£3 or +£5 (in the currency you show costs in), or type another amount and choose Add.
The task can spend the new amount straight away; the chat says You raised this task's budget to …. The panel also shows what's left of today's budget and, if you use Duscode credits, of your credits. Press Esc to close it. Your budget for every task stays as it is in Settings → Budgets.
A raise there also answers Dus: an early offer that was open goes away, and if the task was waiting at its limit, it carries on. You can lower a task's budget there too (−£1 or Lower), never below what it has already spent. A budget you lowered is your answer: Dus doesn't offer more, doesn't raise it by itself, and at the new limit wraps up and stops without asking.
If a task stopped at its budget or was interrupted, the top bar's status light opens the budget the task will have when Dus carries on. Raise it there first, then ask Dus to carry on. Dus can also raise a task's budget when you ask it to, but it always asks you first.
The daily limit is checked before a task starts. It counts what the Duscode server spent today across all its tasks, using the usage history in ~/.duscode/usage.jsonl.
Changing the limits
Set them in your user config, ~/.duscode/config.json, to apply them everywhere:
{
"budget": { "perTaskUsd": 5, "perDayUsd": 40, "autoRaiseUsd": 10 }
}You can also set them in a project's .duscode/config.json.
Warning
A project's
budgetreplaces your userbudgetas a whole object. Include bothperTaskUsdandperDayUsdin it, or the one you leave out goes back to its default.
Worker agents each have their own task budget: workers.perTaskUsd, by default the same as budget.perTaskUsd. Their spending counts towards the daily limit.
Seeing what you spend
-
The task's cost so far in the status light's budget while it runs, against its budget
-
Today's spend in Spending, in the status bar at the bottom right
-
Task cost at the end of every task in the chat
-
Cost so far for the task, in Project details (click the project's name in the top bar)
-
Settings → Usage (from the profile menu, Usage): today, this month, daily spend and spend by model
-
/costin the terminal app -
An estimate before each task starts, and a receipt when it ends: open the task's cost line to see the spend by cause and model. See Cost before, during and after.