Concepts
Budgets
Per-task and per-day spending limits ($2 and $20 by default). A task that is going well is offered more before it runs out, and Dus can raise it by itself up to an amount you set.
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 | $2 | One request to Dus, including the helper agents it uses |
| Per day | $20 | All sessions 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 limit, when the task is going well. If Dus is getting somewhere (plan steps done, the checks passing, not going round in circles), it offers more early, at about 60% of the budget: "This task has used $1.20 of its $2.00 budget and is getting somewhere (2 of 5 plan steps done). 3 plan steps to go, about $1.80 more. Raise it to $4?" One tap raises it. Dus keeps working while you decide, so you can answer from your phone. If you don't answer, it finishes what it can and stops cleanly before the limit.
- At 80%, a task that isn't getting anywhere, or whose offer you turned down, stops starting new work and finishes. A task that is going well and still has your offer open gets until 90% for your answer.
- At 100% Dus asks: Raise to $X and carry on, or Stop here. It recommends raising when the task is going well and stopping when it isn't, and says why. You can also type an amount. A raise lasts for that task (or, for the daily limit, for today in that session). If you stop, nothing is lost: the changes made so far stay, and you can undo them or continue with a new message.
- 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 runs, the top bar shows its cost against its budget, for example Working · $1.75 of $2. Click it to give this task more without going to Settings:
- Click the cost 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 shows 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 sessions, 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 top bar while it runs, against its budget
-
Today's spend in the spend chip on the right of the top bar
-
Task cost at the end of every task in the chat
-
Cost so far for the session, 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.