Releases: codeprakhar25/agent-baton
Releases · codeprakhar25/agent-baton
v0.3.0
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
PreToolUsehook 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
AskUserQuestionwith explicit Continue / Write handoff & stop options. - Global hook install:
baton initwrites Claude hooks to~/.claude/settings.jsonso 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 initonce to pick up the global Claude hooks layout.
v0.2.0
What's new
- Codex usage guard: detects rate-limit signals in Codex transcript rollout files (
~/.codex/sessions/**/rollout-*.jsonl) and offers a handoff before the next prompt. - Per-window thresholds: configure independent
handoff_percentfor Claude's 5-hour / weekly / extra and Codex's 5-hour / weekly windows underlimits.windows. - Agent-authored handoffs:
baton handoff --file <path>registers a complete Markdown handoff written by the handing-off agent, with Baton evidence (git status, diff, last commits) appended. - Auto-install Codex hooks:
baton initnow installs Codex usage hooks into~/.codex/hooks.jsonso handoff prompts work for Codex out of the box. - Config threading:
BatonConfigis now threaded throughcodex,watch, andusageinstead of bare threshold percentages.
agent-baton v0.1.0
Initial agent-baton release.\n\n- Published npm package: @codeprakhar25/agent-baton\n- CLI command: baton\n- Ask-first usage-limit handoff flow\n- Claude hook guard support\n- Codex usage preflight wrapper\n- Global per-project state under XDG-style config/state directories\n- npm package ships the compiled baton CLI