Skip to content

v0.3.0

Latest

Choose a tag to compare

@codeprakhar25 codeprakhar25 released this 18 May 07:44
· 13 commits to main since this release

What's new

  • Warning band: Baton now warns 5% below the hard threshold by default (configurable via limits.warning_buffer_percent), so you get a soft heads-up before the hard handoff trigger.
  • Three-tier cache TTL: usage is fetched at 15 min when far from the limit, 5 min when approaching, and 60 s once inside the warning band — cheap when safe, fresh when it matters.
  • Mid-task detection: a new PreToolUse hook keeps watching during active tool use so a limit hit mid-task is caught within a tool call or two.
  • Smart re-notification: per-crossing notification state plus a 15-minute cooldown prevents the prompt from spamming you after you choose to continue.
  • Interactive picker: when the threshold is crossed, Claude is instructed to fire a structured AskUserQuestion with explicit Continue / Write handoff & stop options.
  • Global hook install: baton init writes Claude hooks to ~/.claude/settings.json so every project is covered without re-running init per-repo.

Upgrade notes

  • New config defaults: limits.warning_buffer_percent: 5, usage_cache.approach_ttl_ms: 300000, usage_cache.pretool_ttl_ms: 60000, usage_cache.notify_cooldown_ms: 900000. Existing configs are merged; old keys still work.
  • If you previously initialized in a project, re-run baton init once to pick up the global Claude hooks layout.