2026-06-21 — Improved token-burn-warning Skill (Request from Anthony)
This commit is contained in:
@@ -49,6 +49,7 @@ git clone ssh://gitea@74.208.111.99:22/Tony_tech/chess-project.git
|
||||
```
|
||||
|
||||
**iMessage/Photon update (on hold):**
|
||||
|
||||
- Device token reissued (valid through June 27)
|
||||
- Project secret rotated
|
||||
- Sidecar running but **outbound blocked** — free plan doesn't allow sending to the user's number
|
||||
@@ -64,4 +65,34 @@ Found that Caddy is already proxying `https://gitea.vps1.afterthedemo.com` → G
|
||||
git clone https://gitea.vps1.afterthedemo.com/Tony_tech/chess-project.git
|
||||
```
|
||||
|
||||
The repo is **public**, so no auth required for cloning. This fully unblocks the Windows desktop setup.
|
||||
The repo is **public**, so no auth required for cloning. This fully unblocks the Windows desktop setup.
|
||||
|
||||
---
|
||||
|
||||
### 2026-06-21 — Improved token-burn-warning Skill (Request from Anthony)
|
||||
|
||||
**Goal:** Upgrade the existing token-burn-warning skill to be proactive and preventive instead of reactive. Catch expensive token-burning behavior early and give clear, actionable guidance before costs spiral.
|
||||
|
||||
**Core Rules:**
|
||||
|
||||
1. **Session-Level Cost Tracking** — Track cumulative cost for the current conversation/session in real time. Trigger warnings at: $0.50 → Light warning + gentle suggestion, $1.00 → Strong warning + recommend changing approach, $2.00+ → Strongly recommend running /new or pausing.
|
||||
|
||||
2. **Retry Loop Detection** — If the same tool or action fails 3+ times in a row, immediately flag it. After 3+ failures on the same task, suggest: try a different approach or tool, ask the user for guidance, or consider running /new if context is growing fast.
|
||||
|
||||
3. **Auth / OAuth Death Spiral Detection** — If a device code, OAuth, or authentication flow is attempted 3+ times in one session → strong warning. Recommend stopping the loop and asking the user to handle auth manually or use an alternative method.
|
||||
|
||||
4. **Context Bloat Detection** — Monitor input token size per response. If context keeps growing significantly without new user input, flag it. Recommend running /new when accumulated context becomes expensive (suggested threshold: ~80k–100k tokens).
|
||||
|
||||
5. **Secret Redaction Interference** — Detect when secret masking is repeatedly breaking scripts or values. Suggest using heredocs (cat << 'EOF') or writing to temporary files instead of fighting the redactor.
|
||||
|
||||
6. **Actionable Recommendations** — Every warning must include specific suggested actions, for example: "Run /new to clear bloated context and reduce cost", "Switch to a cheaper model for this task", "Try a different approach instead of retrying the same failing step", "Pause and summarize progress so far".
|
||||
|
||||
7. **Default Behavior** — Be conservative by default — when in doubt, warn early. Prioritize stopping waste over continuing a failing task. Never silently continue burning tokens on obvious failing loops.
|
||||
|
||||
**Implementation Notes for Leonard:**
|
||||
- Track cumulative session cost (not just per-call)
|
||||
- Make the skill trigger early rather than after big damage is done
|
||||
- Keep warnings short, clear, and actionable
|
||||
- Focus on the patterns that caused the recent $10 burn (retry loops + auth spirals + context bloat)
|
||||
|
||||
**Status:** Posted by Anthony via Telegram. Awaiting Leonard implementation.
|
||||
Reference in New Issue
Block a user