Skip to main content
Budgets give you control over AI spend without blocking productive work. You set the envelope; Terma watches it and either notifies you when you’re approaching the limit or stops sessions automatically when you hit it — depending on how you configure each budget. The same budget machinery that guards production tenants applies to dev-time spend, so the model is consistent whether you’re managing an engineering team or a live AI workload.

Budget Scopes

A budget can be scoped to any of these dimensions:
  • Team — all sessions attributed to members of a given team count against the envelope
  • Repository area — sessions that touch a specific directory path or codebase area
  • Experiment — a named label you apply to sessions to group exploratory or time-boxed work
Scopes can overlap; a session that touches a repository area covered by a team budget will count against both independently.

Budget Types

Soft Threshold

A soft threshold sends a Slack notification when cumulative spend in the current period reaches a configured percentage of the budget limit (for example, 80% or 90%). Work continues uninterrupted. The notification includes:
  • Current spend and percentage used
  • Estimated pace to end of period
  • A direct link to the breakdown for that scope
Use a soft threshold when you want visibility and an early warning without any risk of stopping a session mid-task.

Hard Cap

A hard cap stops the harness mid-session when the budget is fully exhausted. The session is saved in its current state and can be resumed after the budget period resets. Use a hard cap when you need a strict ceiling — for experiments with fixed budgets, or for teams where runaway spend is a governance concern.

Creating a Budget

In the dashboard, navigate to Budgets and click New budget. Configure:
  1. Scope — choose Team, Repository area, or Experiment, then select the target
  2. Period — Monthly or Weekly; the envelope resets at the start of each period
  3. Limit — the maximum spend for the period, in your billing currency
  4. Notification threshold — the percentage of the limit at which a soft Slack alert fires
  5. Hard cap — toggle on to stop sessions when the limit is reached

Example Budget Configuration

The AI tools & prototyping budget has a soft threshold at 80%; the team lead received a Slack notification but sessions continue. The sandbox/experiments budget has a hard cap and no soft threshold; two sessions were stopped when the weekly €500 limit was reached and will resume when the period resets.

Slack Integration

Connect your Slack workspace to receive budget notifications:
  1. Open Dashboard → Settings → Notifications
  2. Click Connect Slack and authorize the Terma app in your workspace
  3. Choose the channel where budget alerts should appear
  4. Save
Once connected, soft threshold alerts appear in your chosen channel with current spend, pace, and a link to the affected breakdown. You can configure different channels for different budget scopes if you want team-specific channels to receive their own alerts.

Hard Cap Behavior

When a hard cap is reached, Terma sends a stop signal to the harness. The harness halts the session at the next safe point — after the current tool call completes, before the next prompt is sent. The session state is preserved:
  • All events up to the stop point are retained in session replay
  • The session is marked as capped in the Sessions list
  • The engineer can resume the session after the budget period resets
Sessions stopped by a hard cap are not lost. The full history is available in replay and the git work that occurred before the cap is unaffected.
Set a soft threshold at 80% and a hard cap at 100% together. The soft alert gives you time to investigate whether spend is on track before the hard cap fires — and if it does fire, you’ve already been warned.
Hard caps stop sessions immediately at the limit. Make sure engineers working in capped scopes know which experiments are under hard caps so they can plan their sessions accordingly and avoid losing work mid-task.