Proof Portal
Omarchy
ProbeLabs65 findings · 95 requirementsA proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.
Agents panel counts local-model turns as Codex subscription usage
Reported by Ronin11 · filed Sep 16, 2026Closed upstream on 2026-10-04 by the bot omarchybot; the closing comment says it was fixed by PR #14049. GitHub close reason: completed.
At a glance
- 1 · What is claimed?
- Only the report text below — no validator has restated it as checkable claims yet.
- 2 · What does it affect?
- Not yet mapped to any requirement or component.
- 3 · Is it reproducible?
- No validation has been run yet.
- 4 · What remains unclear?
- Not validated yet: no claims, no reproducer.
- 5 · What happens next?
- Our staff decide whether the report is valid. Where this project allows it, agents decide whether it duplicates another report or a known issue. No decision has been recorded yet.
Original report
What happens
The agents bar widget attributes every rollout in $CODEX_HOME/sessions to the Codex subscription, including turns Codex CLI served from a local or third-party backend. On a machine that uses codex as a front-end for Ollama, the panel's "Tokens by day", "Tokens by model", session and prompt counts are all inflated by usage the subscription never paid for.
Real record from my machine, ~/.local/state/omarchy/agents/usage/codex.json:
"todayTokensByModel": {"qwen3-coder:30b": 21037, "gpt-6-astra": 31580}qwen3-coder:30b is a local Ollama model. It is 40% of the number on that tab.
The rate-limit meters are unaffected — those come from the app-server RPC, not from session files — so this is a stats-accuracy bug, not a false quota warning.
Why
scan_native_codex_sessions() in bin/omarchy-agent-usage-codex walks every *.jsonl under the session roots and counts all of it. It reads model from turn_context and never looks at the provider.
The provider is recorded, but on session_meta, which the scan skips past:
$ head -1 rollout-…-01a0a6c1.jsonl | jq '.payload.model_provider'
"ollama"
$ head -1 rollout-…-01a0a6c7.jsonl | jq '.payload.model_provider'
"openai"turn_context carries model but no provider field at all, so the one record that knows is the one the scan ignores.
Notably the other two scanners in the same file already guard against exactly this:
scan_pi_sessions()requiresprovider == "openai-codex"scan_opencode_sessions()does an exact match onproviderID == "openai", with a comment that reads "a customopenai-localgateway is not this subscription"
So the intent is established and consistent; the native scanner is the one path that never got the check.
Reproduce
export CODEX_HOME=$(mktemp -d)
mkdir -p "$CODEX_HOME/sessions/$(date +%Y/%m/%d)"
cat > "$CODEX_HOME/sessions/$(date +%Y/%m/%d)/rollout-local.jsonl" <<'JSON'
{"type":"session_meta","payload":{"model_provider":"ollama"}}
{"type":"turn_context","payload":{"model":"qwen3-coder:30b"}}
{"type":"event_msg","payload":{"type":"token_count","info":{"last_token_usage":{"input_tokens":9000,"output_tokens":900}}}}
JSON
omarchy-agent-usage-codex --force | jq .todayTokensByModel
# {"qwen3-coder:30b": 9900} <- a local model billed to the Codex subscriptionAny non-OpenAI provider reproduces it. In testing, an OpenRouter-backed rollout showed up on the Codex tab as "claude-sonnet-5", which makes the conflation especially visible.
Suggested fix
Read session_meta.model_provider and skip the rollout when it is present and is not openai. Rollouts written before Codex recorded the field carry no provider and must keep counting, so the check should be "present and different", not "not equal".
A related gap, for the record
scan_projects() in bin/omarchy-agent-usage-claude has the same structural shape — no endpoint filter on native transcripts — so pointing Claude Code at a proxy would conflate the same way.
It is not fixable by the same means, though: Claude Code transcripts record no provider or base URL. Dumping the fields from an assistant entry gives
cwd, entrypoint, gitBranch, isSidechain, parentUuid, requestId, sessionId,
timestamp, type, userType, uuid, version,
message.{content, diagnostics, id, model, role, stop_details, stop_reason, usage, ...}Codex writes session_meta.model_provider; Claude Code writes nothing equivalent. The only available signal would be guessing from the model name, which seems too fragile to be worth it. Mentioning it so the bug class is on the record rather than looking overlooked — I would not want it bundled into the Codex fix.
Environment
- omarchy 4.0.3-1, Arch
- codex CLI 0.154.0
omarchy.agentsbar plugin- Present on
quattro:bin/omarchy-agent-usage-codexis byte-identical to the installed 4.0.3 copy
View raw text
## What happens
The agents bar widget attributes **every** rollout in `$CODEX_HOME/sessions` to the Codex subscription, including turns Codex CLI served from a local or third-party backend. On a machine that uses `codex` as a front-end for Ollama, the panel's "Tokens by day", "Tokens by model", session and prompt counts are all inflated by usage the subscription never paid for.
Real record from my machine, `~/.local/state/omarchy/agents/usage/codex.json`:
```json
"todayTokensByModel": {"qwen3-coder:30b": 21037, "gpt-6-astra": 31580}
```
`qwen3-coder:30b` is a local Ollama model. It is 40% of the number on that tab.
The rate-limit meters are unaffected — those come from the app-server RPC, not from session files — so this is a stats-accuracy bug, not a false quota warning.
## Why
`scan_native_codex_sessions()` in `bin/omarchy-agent-usage-codex` walks every `*.jsonl` under the session roots and counts all of it. It reads `model` from `turn_context` and never looks at the provider.
The provider *is* recorded, but on `session_meta`, which the scan skips past:
```
$ head -1 rollout-…-01a0a6c1.jsonl | jq '.payload.model_provider'
"ollama"
$ head -1 rollout-…-01a0a6c7.jsonl | jq '.payload.model_provider'
"openai"
```
`turn_context` carries `model` but no provider field at all, so the one record that knows is the one the scan ignores.
Notably the other two scanners in the same file already guard against exactly this:
- `scan_pi_sessions()` requires `provider == "openai-codex"`
- `scan_opencode_sessions()` does an exact match on `providerID == "openai"`, with a comment that reads "a custom `openai-local` gateway is not this subscription"
So the intent is established and consistent; the native scanner is the one path that never got the check.
## Reproduce
```bash
export CODEX_HOME=$(mktemp -d)
mkdir -p "$CODEX_HOME/sessions/$(date +%Y/%m/%d)"
cat > "$CODEX_HOME/sessions/$(date +%Y/%m/%d)/rollout-local.jsonl" <<'JSON'
{"type":"session_meta","payload":{"model_provider":"ollama"}}
{"type":"turn_context","payload":{"model":"qwen3-coder:30b"}}
{"type":"event_msg","payload":{"type":"token_count","info":{"last_token_usage":{"input_tokens":9000,"output_tokens":900}}}}
JSON
omarchy-agent-usage-codex --force | jq .todayTokensByModel
# {"qwen3-coder:30b": 9900} <- a local model billed to the Codex subscription
```
Any non-OpenAI provider reproduces it. In testing, an OpenRouter-backed rollout showed up on the Codex tab as `"claude-sonnet-5"`, which makes the conflation especially visible.
## Suggested fix
Read `session_meta.model_provider` and skip the rollout when it is present and is not `openai`. Rollouts written before Codex recorded the field carry no provider and must keep counting, so the check should be "present and different", not "not equal".
## A related gap, for the record
`scan_projects()` in `bin/omarchy-agent-usage-claude` has the same structural shape — no endpoint filter on native transcripts — so pointing Claude Code at a proxy would conflate the same way.
It is **not** fixable by the same means, though: Claude Code transcripts record no provider or base URL. Dumping the fields from an assistant entry gives
```
cwd, entrypoint, gitBranch, isSidechain, parentUuid, requestId, sessionId,
timestamp, type, userType, uuid, version,
message.{content, diagnostics, id, model, role, stop_details, stop_reason, usage, ...}
```
Codex writes `session_meta.model_provider`; Claude Code writes nothing equivalent. The only available signal would be guessing from the model name, which seems too fragile to be worth it. Mentioning it so the bug class is on the record rather than looking overlooked — I would not want it bundled into the Codex fix.
## Environment
- omarchy 4.0.3-1, Arch
- codex CLI 0.154.0
- `omarchy.agents` bar plugin
- Present on `quattro`: `bin/omarchy-agent-usage-codex` is byte-identical to the installed 4.0.3 copy
Validation
Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.
Linked
Not linked to any known issue, other report or change yet.
Decision
Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.
No decision has been recorded yet.