Repository navigation
Add Claude and Codex usage limit indicator - #12
Merged
Merged
Conversation
Add a global #{agent_limits} tmux interpolation backed by Claude status-line snapshots and Codex rollout rate-limit events. Show explicit used percentages so the segment matches provider dashboards, hide expired windows, and cache rendered output to avoid repeated filesystem scans.
Preserve existing Claude status-line commands by chaining them through the installer and restoring them on uninstall. Document the options and add collector, installer, and interpolation regression coverage.
Run Bash syntax checks, ShellCheck, Python compilation, and the isolated tmux test suite for pull requests and pushes to main. Correct the window-title regression setup so it exercises a background agent window, and clean up existing ShellCheck warnings so the repository-wide lint job is actionable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
#{agent_limits}tmux status interpolation.token_countevents.C 5h 57% used · X 7d 3% used.Why
Agent lifecycle state shows when work needs attention, but it does not show whether the shared provider account is approaching a usage cap. This adds that account-level signal without tying limits to one pane or requiring Herdr at runtime.
The repository had no automated pull-request checks. The CI workflow now catches shell regressions and exercises the full tmux behavior suite before merge.
How
The Python collector reads provider-owned local files and writes a versioned cache under the user cache directory. A small shell wrapper reads tmux options and invokes the collector. The installer wraps Claude status-line commands with a base64-preserved pass-through so existing status output remains unchanged.
CI runs separate lint and test jobs on pull requests and pushes to
main. The window-title regression setup now places its agent pane in the background, matching the production condition under test.Validation
./tests/run-all.shbash -n agent-indicator.tmux scripts/*.sh install.sh setup.sh tests/*.sh tests/lib/*.shshellcheck -x -S warning agent-indicator.tmux scripts/*.sh install.sh setup.sh tests/*.sh tests/lib/*.shpython3 -m py_compile scripts/agent-limits.pygit diff --checkAll automated tests and lint checks pass locally.