Skip to content

Add GitHub Copilot usage to agents widget - #8972

Closed
gaburn wants to merge 2 commits into
omacom:quattrofrom
gaburn:feature/copilot-agent-usage
Closed

gaburn wants to merge 2 commits into
omacom:quattrofrom
gaburn:feature/copilot-agent-usage

Conversation

@gaburn

@gaburn gaburn commented Aug 29, 2026 •

Copy link
Copy Markdown

Summary

  • add a standalone GitHub Copilot CLI collector backed by its local session-store.db
  • show token history from every primary-agent and subagent model call while counting prompts as completed, usage-bearing user turns
  • support COPILOT_HOME, live WAL reads, defensive schema discovery, token-only fallback when turn metadata is unavailable, and day-aware cached scans
  • keep cached usage private and make caching a pure optimization
  • enable Copilot by default, identify it explicitly as CLI-local usage, and use a compact provider tab label
  • avoid reading prompt/response content, repository names, tool output, account credentials, or undocumented quota endpoints

This intentionally reports GitHub Copilot CLI activity retained on the machine, not account-wide usage from IDEs or cloud agents. Account limits and AI-credit UI are out of scope because no stable local interface exposes the subscription allowance.

Testing

  • ./test/shell.d/agent-usage-copilot-scanner-test.sh
  • ./test/cli
  • ./test/shell (all except three existing packaging checks that require a neighboring omarchy-pkgs checkout: config-test.sh, snapper-test.sh, and unowned-system-paths-test.sh)
  • live four-provider Agents panel verification with Claude, Codex, Copilot, and Fireworks

The focused collector coverage includes multi-model/subagent fan-out, completed-turn counting, timestamp boundaries, token category splitting, partial and incompatible schemas, missing/empty databases, custom COPILOT_HOME, live WAL reads, cache failure fallback, cache timing and midnight invalidation, private cache permissions, and concurrent scans.

Screenshot

Agents panel showing GitHub Copilot CLI usage

gaburn and others added 2 commits August 29, 2026 09:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #9945, which covers the same Copilot usage collector. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants