Skip to content

Say what a stopped box costs, when it goes, and what is saved - #80

Merged
Adambomb210 merged 1 commit into
mainfrom
claude/box-clarity
Nov 13, 2026
Merged

Adambomb210 merged 1 commit into
mainfrom
claude/box-clarity

Conversation

@Adambomb210

Copy link
Copy Markdown
Collaborator

A stopped box keeps billing for its disk until it's resumed or destroyed. Only /workspace is saved, and only for that same box. Members weren't told most of this:

  • the job page and krater show gave a stopped box's full GPU price;
  • the guide said its disk still bills "a little";
  • the Slack notices said "its last saved workspace is kept", though no member can reach it once the box is destroyed: the workspace isn't a readable area, and it's stored per job.

What members now see

  • Job page:
    • for a stopped box: "$0.0088/h while stopped (about $0.22 a day): only its disk bills", the full running price, and when it will be destroyed;
    • for every box: when /workspace was last saved, and what is and isn't saved;
    • Cancel for a box says what it loses. A running box loses work since its last save, with "stop the box instead". A stopped box's cancel ends the disk charge, and the box can't be brought back.
  • API: adds machine.usd_per_hour_now and box.{destroy_at, destroy_after_hours, workspace_saved_at, workspace_save_minutes}. usd_per_hour is unchanged.
  • CLI:
    • krater show prints the stopped cost, the destroy time and the last save. Against an older Krater it falls back to the old machine line;
    • krater cancel on a box says the box can't be brought back.
  • Slack:
    • "Box stopped" gives the disk cost and the destroy time. Notices already queued at deploy time lack the new fields and render as before;
    • "destroyed soon" says to copy out anything needed;
    • "destroyed" no longer says the workspace is kept.
  • Guide:
    • the concrete disk cost;
    • Cancel for boxes;
    • "the saved copy is for this box only";
    • two troubleshooting rows.

The rate comes from spend.hourly_rate_microusd, the same rule the accrual uses. There is no migration.

Not in this PR

A destroyed box's /workspace can't be downloaded, and a new box can't start from it. That's a separate decision.

Tests

  • New tests for:
    • stopped and running box pages;
    • the API fields, including a job having no box field;
    • the CLI show and cancel lines, including against an older Krater;
    • the Slack notices with and without the new payload fields;
    • the scheduler's stopped-notice payload.
  • The full server suite passes locally: 1940, plus the one updated assertion that pinned the old "workspace is kept" reason. The CLI's 195 tests pass. Ruff is clean.
  • Not tried live: a stopped box on staging needs a paid box run.

🤖 Generated with Claude Code

A stopped box keeps billing for its disk until it's resumed or destroyed, and
only /workspace is saved, for the same box only. The page, CLI and Slack said
little of this and some of it wrong ("its last saved workspace is kept", which
no member can reach once the box is destroyed).

- krater/services/boxes.py: the rate now (spend.hourly_rate_microusd), when a
  stopped box is destroyed, the last /workspace save, cents a day.
- Job page: a stopped box's price is "$X/h while stopped (about $Y a day): only
  its disk bills", with when it is destroyed; every box shows its last save and
  what is (and isn't) saved; Cancel says what it loses, for a running and a
  stopped box.
- API: machine.usd_per_hour_now, and box.{destroy_at, destroy_after_hours,
  workspace_saved_at, workspace_save_minutes}; usd_per_hour is unchanged.
- CLI: `krater show` prints the stopped cost, destroy time and last save
  (old machine line against an older Krater); `krater cancel` on a box says
  it can't be brought back.
- Slack: "Box stopped" gives the disk cost and destroy time (notices queued
  before this render as before); destroy-soon and destroyed no longer say the
  workspace is kept.
- Scheduler: the destroy reason and the stopped notice's payload.
- Guide and CLI docs: concrete disk cost, Cancel for boxes, the saved copy is
  for that box only, troubleshooting rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Adambomb210
Adambomb210 merged commit 11904b8 into main Nov 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant