No error is a dead end: crash, click, and your agent is already looking

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 12:50:09 -04:00
parent ada0faf1d1
commit cc7d91d09c
43 changed files with 4648 additions and 327 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Remove the retired single-agent usage record. The bar's usage widget grew
# from one hardcoded Claude collector into per-agent collectors writing under
# $XDG_STATE_HOME/panama/agents/usage/, and the old record file it replaced
# would otherwise sit as dead state forever.
#
# Rules, because the runner cannot enforce them:
#
# * Safe to run twice. The marker records success, not intent.
# * Tolerant of the repair already being correct -- the user may have fixed
# it by hand, or a later ./install may have put it back.
# * Root work goes through `panama-sudo --reason "..."`, never bare sudo,
# so the password prompt names the repair.
# * Exit non-zero to be retried at the next login. Exit zero only when the
# machine is genuinely in the state this describes.
set -euo pipefail
PANAMA_PATH="${PANAMA_PATH:-$HOME/.local/share/Panama}"
rm -f "${XDG_STATE_HOME:-$HOME/.local/state}/panama/agent-usage.json"