Deduplicate Codex usage across Pi forked sessions - #8602
Conversation
There was a problem hiding this comment.
Pull request overview
Deduplicates inherited Codex usage across Pi/OMP fork lineages while preserving usage from new responses and unrelated ID collisions.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Uses message identity and
parentSessionancestry for deterministic usage attribution. - Expands scanner tests for forks, scan ordering, and ID collisions.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/omarchy-agent-usage-codex |
Deduplicates inherited messages and recalculates session ownership. |
test/shell.d/agent-usage-codex-scanner-test.sh |
Tests fork accounting and collision handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Related native-collector correction: #10531 skips repeated It stays within |
Summary
parentSessionlineage so scan order cannot change session totalsTesting
bash test/shell.d/agent-usage-codex-scanner-test.shpython3 -m py_compile bin/omarchy-agent-usage-codexbash bin/omarchy commands --check(437 commands)Fixes #8564