Budget policy

The policy maps your budget to a mode, and the mode tells the agent how to work. It lives in .orstrum/policy.json; /orstrum:orstrum start writes it from a preset, and a hand-edited file works on every tier.

How it reaches the agent

After each usage sample the hook works out the week percentage, the five-hour percentage and the binding limit: the all-models weekly limit, unless the session's model has a tighter per-model limit. The policy turns that into a mode, and the mode rides on one line pushed at session start and whenever it changes:

Orstrum budget: week 63% · 5h 41% · measured · mode conserve (orstrum skill).

Modes

Checked in this order; the first match wins. Thresholds are the defaults.

ModeWhenWhat the agent does
pause5-hour window ≥ 90%Finish the current step, checkpoint, stop, and say when the window resets.
wrap_upWeekly limit ≥ 80% and more than 24 h until resetTell you in one sentence, checkpoint, propose a handoff point, and don't start work that can't finish in the remaining budget.
conserveWeekly limit ≥ 50% (or ≥ 80% with a day or less to reset)Checkpoint on every passing test, build or run; prefer targeted edits over re-reading files; no speculative subagent fan-out.
normalOtherwiseWork normally.

Over 80% with a day or less to reset falls back to conserve, not wrap_up: the limit refills soon, and stopping early would waste it.

The file

{
  "version": 1,
  "week":      { "conserve_at": 50, "wrap_up_at": 80, "wrap_up_min_hours_to_reset": 24 },
  "five_hour": { "pause_at": 90 },
  "loop":      { "failing_edits": 3, "repeated_errors": 3, "block_ignored": true },
  "tampering": { "enabled": true },
  "bloat":     { "context_tokens": 400000, "tool_output_kb": 1024 }
}

Every field has a default, so a missing file, a partial file or {} all give the full default policy.

Presets

PresetConserve / wrap upPause (5 h)Loop afterBloat
relaxed70% / 90%95%4 failing editsdefault
default50% / 80%90%3 failing edits400k tokens, 1 MB output
strict35% / 65%80%2 failing edits200k tokens, 512 KB output
The defaults are conservative guesses, not measured optima. They are being tuned on real sessions. If a threshold fires too early or too late for your team, change the file; it takes effect at the next session.