Add a dedicated pi agent usage collector - #10330
Open
surim0n wants to merge 2 commits into
Open
Conversation
pi and oh-my-pi sessions are currently folded into the Claude and Codex collectors, which only count Anthropic and openai-codex providers. Users on any other backend (OpenRouter, Kimi, etc.) never see their usage in the agents panel. Add bin/omarchy-agent-usage-pi to scan ~/.pi and ~/.omp sessions for any provider, and stop counting those sessions in the Claude and Codex collectors. Fixes omacom#8270 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
surim0n
marked this pull request as draft
September 8, 2026 03:50
Make local usage caching date-aware, optional and safe after empty or failed refreshes. Validate transcript records, discover configured session roots and profiles, and deduplicate inherited responses without conflating independent short IDs or mutable billing fields. Invalidate pre-split Codex caches, label Pi as local usage, and cover the regressions in both UTC and UTC+14. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
surim0n
marked this pull request as ready for review
September 8, 2026 04:15
Author
|
Pushed f481aa5 after a deeper audit. Added cache/date/write-failure regressions, malformed-record handling, configured roots/profiles, fork and physical-alias deduplication, and Codex cache-transition coverage. All 25 Pi tests plus the original assertions pass in UTC and UTC+14; adjacent collector/updater tests and the CLI suite pass in isolated Linux. The description documents validation limits and overlap with #8602, #9546, #8345 and #8649. Pi is labeled Local usage; no quota or cost is inferred. |
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
Fixes #8270.
Add a dedicated local Pi/Oh My Pi usage record for every backend, including OpenRouter. Claude and Codex no longer aggregate Pi/OMP transcripts; native and opencode collection remains intact.
Changes
Validation
Coordination
Related active work: #8602 (fork deduplication), #9546 (profiles), #8345 (roots/cache identity), and #8649 (OMP collector). After this split, Pi fixes must target the dedicated collector rather than unused Claude/Codex Pi scanners. Agree on OMP ownership before adding another record.
Generated with Devin