fix(costs): disable cost tracking until Claude Code exposes cost data

Cost tracking infrastructure works but has no data source:
- Claude Code displays costs in TUI status bar, not scrollback
- tmux capture-pane can't see TUI chrome
- All sessions show $0.00

Changes:
- Mark gt costs command as [DISABLED] with deprecation warnings
- Mark costs-digest patrol step as [DISABLED] with skip instructions
- Document requirement for Claude Code to expose CLAUDE_SESSION_COST

Infrastructure preserved for re-enabling when Claude Code adds support.

Ref: GH#24, gt-7awfjq

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gus
2026-01-17 02:49:17 -08:00
committed by Steve Yegge
parent 72b03469d1
commit bd655f58f9
2 changed files with 38 additions and 31 deletions

View File

@@ -629,41 +629,29 @@ Skip dispatch - system is healthy.
[[steps]]
id = "costs-digest"
title = "Aggregate daily costs"
title = "Aggregate daily costs [DISABLED]"
needs = ["session-gc"]
description = """
**DAILY DIGEST** - Aggregate yesterday's session cost wisps.
**⚠️ DISABLED** - Skip this step entirely.
Session costs are recorded as ephemeral wisps (not exported to JSONL) to avoid
log-in-database pollution. This step aggregates them into a permanent daily
"Cost Report YYYY-MM-DD" bead for audit purposes.
Cost tracking is temporarily disabled because Claude Code does not expose
session costs in a way that can be captured programmatically.
**Step 1: Check if digest is needed**
```bash
# Preview yesterday's costs (dry run)
gt costs digest --yesterday --dry-run
```
**Why disabled:**
- The `gt costs` command uses tmux capture-pane to find costs
- Claude Code displays costs in the TUI status bar, not in scrollback
- All sessions show $0.00 because capture-pane can't see TUI chrome
- The infrastructure is sound but has no data source
If output shows "No session cost wisps found", skip to Step 3.
**What we need from Claude Code:**
- Stop hook env var (e.g., `$CLAUDE_SESSION_COST`)
- Or queryable file/API endpoint
**Step 2: Create the digest**
```bash
gt costs digest --yesterday
```
**Re-enable when:** Claude Code exposes cost data via API or environment.
This:
- Queries all session.ended wisps from yesterday
- Creates a single "Cost Report YYYY-MM-DD" bead with aggregated data
- Deletes the source wisps
See: GH#24, gt-7awfj
**Step 3: Verify**
The digest appears in `gt costs --week` queries.
Daily digests preserve audit trail without per-session pollution.
**Timing**: Run once per morning patrol cycle. The --yesterday flag ensures
we don't try to digest today's incomplete data.
**Exit criteria:** Yesterday's costs digested (or no wisps to digest)."""
**Exit criteria:** Skip this step - proceed to next."""
[[steps]]
id = "patrol-digest"