You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agents panel never appears for active pi users on non-Anthropic/non-Codex backends (e.g. OpenRouter) #8270
Default agent: pi (~/.config/omarchy/defaults/agent contains pi)
Summary
The omarchy.agents bar widget and panel never appear on a machine where pi — one of the agents Omarchy offers as a default in setup — is actively used, if pi is configured with a backend other than Anthropic or openai-codex (e.g., OpenRouter). Two days of heavy daily use produce no icon, no panel, and no hint anything is wrong.
What happens vs. what's expected
Expected: Since both shipped collectors deliberately scan ~/.pi/agent/sessions/, using pi should eventually surface usage in the agents panel.
Actual: All usage records stay at zero for any pi session not routed through the two recognized backends, so the widget self-hides permanently.
Steps to reproduce
Install Omarchy 4.0.1-1; set default agent to pi (omarchy-default-agent pi).
Configure pi with a non-Anthropic, non-Codex backend (in my case OpenRouter via the openai-completions API) and use it daily for 2+ days (334 assistant messages across multiple sessions).
Observe: no agents icon in the bar, no panel. Every record in ~/.local/state/omarchy/agents/usage/ reports zero prompts/sessions/active days.
Root cause analysis
The collectors scan pi's session directory on purpose but filter strictly by backend:
omarchy-agent-usage-codex, scan_pi_sessions(): only counts entries where provider is openai-codex or api starts with openai-codex.
Meanwhile pi writes provider, model, and token usage on every assistant message regardless of which backend served it — so the data needed to count usage from any provider is already present in the JSONL.
Because every record ends up empty, Main.qml's enabledProviders list is empty and the widget collapses out of the bar by design ("with none, the module leaves the bar entirely"). That self-hiding behavior is reasonable when collectors are complete, but here it means an active agent user gets silence instead of a panel — and no diagnostic path to figure out why.
Suggested fix
Either:
A generic pi collector that records usage from pi session transcripts regardless of provider (one "pi" record aggregating all backends), or
Per-provider records derived from the same transcripts, matching how claude/codex tabs work today.
Option 1 seems simplest since the parsing logic (usage extraction by assistant message) already exists in scan_pi_usage() — it just needs the provider filter removed or widened.
Thanks for the detailed report. I checked it against the source of 4.0.1, 4.0.4 and the current quattro branch. I read the code but did not run it, because the mechanism shows directly in the source.
The missing icon is fixed on quattro but not released yet. Up to and including 4.0.4, shell/plugins/agents/Panel.qml sets visible: providers.length > 0. When no collector has recorded usage, the bar collapses the widget to nothing. That is exactly what you saw. c05d901 (#13770) removed that line. The icon now always stays in the bar, and with no agent recorded the panel opens on a setup page instead of hiding. No release tag contains that commit yet, so it will arrive with the next release after 4.0.4.
pi traffic through OpenRouter still isn't counted on quattro, and that is by design rather than an oversight. Each record describes one subscription. The Claude collector counts pi messages only where provider is anthropic, and the Codex collector only where it is openai-codex. The comments in both collectors and the panel's README say they leave other backends out on purpose. The one exception is Fireworks: its collector reads the key pi stores and reports Fireworks usage from the billing API, so pi on Fireworks does show up. Showing OpenRouter usage would take a new collector, so that part of this report is a feature request.
#14039, which is open, adds an OpenRouter collector and mentions this issue. As it stands, it would not cover your setup. It looks for the key in OPENROUTER_API_KEY, opencode's auth.json or ~/.config/omarchy/agents/openrouter.json. It takes token history from opencode's database or from OpenRouter's /activity endpoint, which needs a management key. It reads neither ~/.pi/agent/auth.json nor pi's session transcripts.
Reviewed by Claude Opus 5.5, with a second opinion from Codex at medium effort. Codex came to the same conclusions and found the Fireworks exception; its independence from this review is not guaranteed. Whether #14039 should also read pi's OpenRouter key and sessions is for the maintainer to decide, so this issue now waits on them.
Activity
omarchybot commentedon Oct 9, 2026
Thanks for the detailed report. I checked it against the source of 4.0.1, 4.0.4 and the current
quattrobranch. I read the code but did not run it, because the mechanism shows directly in the source.The missing icon is fixed on
quattrobut not released yet. Up to and including 4.0.4,shell/plugins/agents/Panel.qmlsetsvisible: providers.length > 0. When no collector has recorded usage, the bar collapses the widget to nothing. That is exactly what you saw. c05d901 (#13770) removed that line. The icon now always stays in the bar, and with no agent recorded the panel opens on a setup page instead of hiding. No release tag contains that commit yet, so it will arrive with the next release after 4.0.4.pi traffic through OpenRouter still isn't counted on
quattro, and that is by design rather than an oversight. Each record describes one subscription. The Claude collector counts pi messages only whereproviderisanthropic, and the Codex collector only where it isopenai-codex. The comments in both collectors and the panel's README say they leave other backends out on purpose. The one exception is Fireworks: its collector reads the key pi stores and reports Fireworks usage from the billing API, so pi on Fireworks does show up. Showing OpenRouter usage would take a new collector, so that part of this report is a feature request.#14039, which is open, adds an OpenRouter collector and mentions this issue. As it stands, it would not cover your setup. It looks for the key in
OPENROUTER_API_KEY, opencode'sauth.jsonor~/.config/omarchy/agents/openrouter.json. It takes token history from opencode's database or from OpenRouter's/activityendpoint, which needs a management key. It reads neither~/.pi/agent/auth.jsonnor pi's session transcripts.Reviewed by Claude Opus 5.5, with a second opinion from Codex at medium effort. Codex came to the same conclusions and found the Fireworks exception; its independence from this review is not guaranteed. Whether #14039 should also read pi's OpenRouter key and sessions is for the maintainer to decide, so this issue now waits on them.