Repository navigation
Conversation
Remote agent-usage scanning tries wsh first and reads the logs over the existing SFTP session otherwise, with a per-file cache keyed by size and mtime. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
The wsh attempt now times out after 8s and the meter's request after 90s, so a dead wsh route no longer eats the whole budget (EC-TIME) before SFTP is tried. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
An empty agentusage:agent is dropped by omitempty on its way to the frontend, so Off silently reverted to the Claude default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
…atusline Claude Code hands rate_limits (5h and 7d percent plus reset time) to the statusline command, and nothing else records them. A statusline line saves them to ~/.claude/rate-limits.json; the meter reads that file on the local machine or over wsh/SFTP and prefers it to the log-based estimate. A window past its reset falls back to the estimate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
Owner
Author
|
Also on this branch: exact Claude plan percentages and reset times.
|
…sage Claude plans only have a 5h and a 7d limit, so the daily token budget setting and the "until reset" countdown to local midnight were misleading. The Today row now shows plain token totals. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
Merged
Owner
Author
|
Closing: every commit on this branch is already in main via the v0.17.0 release (#53). |
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.
Summary
Agent usage meter now works on remote hosts without wsh.
AgentUsageCommandtries wsh first; if the connection has no wsh (or the wsh call fails) it reads the agent logs over the existing SFTP session and parses them locally. A per-file cache keyed by size and mtime means each poll only re-reads changed files.Stacked on #38 (
feat/agent-usage-widget). Merge #38 first, then this; retarget tomainafter #38 merges.Routes
RemoteAgentUsageCommandon the connection route.sftpfs.AgentUsageSource; no wsh needed on the host.Testing
go test ./pkg/agentusage/(both routes' shared code via an in-memoryFileSource: cache hit, changed file, deleted file, old/non-jsonl skipped; Codex parser)go veton agentusage, sftpfs, wshserver;npx vitest run;tscwith no new errors🤖 Generated with Claude Code
https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6