Files
magpie/docs
yetone f0b99745ed provider: a Codex account is held on allowed false alone, as the 26.1029 app's Send gate reads it (xiaoq6285)
xiaoq6285 (Discord, Codex App 26.1029 on Windows, Plus, model_provider =
"magpie", requires_openai_auth = true) answered 40cfd32b0: "但是5小时也得算的
我就是5小时用完了 周额度还有" - their 5h window was used up with the week
open, and Send was grey.

What the app greys Send on, read from the bundles:
- ChatGPT.app 26.1029.61003 (the macOS build of the reporter's version,
  from persistent.oaistatic.com/codex-app-prod/appcast.xml), async chunk
  "a6kU": the composer gate returns open unless
  "n.rate_limit?.allowed!==!1" fails, i.e. it greys only on allowed
  false (then lets credits and a workspace within its overage through, and
  a window redeemed with a reset). The composer's sendBlocked is that gate
  or a model-scoped additional_rate_limits entry for the selected model.
- OpenAI.Codex 26.1027.3384 on the Windows box (app-primary lV,
  composer-content TN) and ChatGPT.app 26.1021: the same.
- The app keeps a window of an allowed account at 1% or more left
  ("Math.max(100-e,+(!0===t))"), so allowed true with 100% reads as room.

What the backend says at a used-up 5h window: the real Team reply in
testdata (codex_usage_team_spend_cap.json) has 5h at 100%, the week at
63%, and allowed false, limit_reached true.

So the reporter's case is allowed false, which codexHeld held before
40cfd32b0 and still does; no 5h rule is needed. 40cfd32b0's two new
held cases (allowed not said with limit_reached or a window at 100%;
allowed true with every window at 100%) are readings the app still sends
for, so holding them only took the app out of ChatGPT (#996) for nothing.
codexAtLimit is allowed false again. A new subcase pins the reporter's
shape (Plus, 5h at 100%, week open, allowed false, no credits: held).

Why Send stayed grey with requires_openai_auth still written is not
explained by the rule: with allowed false and no credits magpie holds
it. Left open: their reading, their magpie log, and whether a
model-scoped limit (additional_rate_limits, which magpie doesn't read)
was what greyed it.

Run on mote: go test -count=1 -timeout 45m ./internal/provider
./internal/agent ok (172s, 334s); go vet ./internal/provider native, GOOS=windows
and GOOS=linux ok; gofmt -l clean. Broken by hand: with origin/main's
subscription_usage.go and these tests, TestCodexUsedUpIsWhatTheAppHolds
fails on "limit reached, allowed not said", "window at 100%, allowed not
said" and "every window at 100% but allowed" (CodexUsedUp = true, want
false).
Not tried: the real 26.1029 app with a used-up account, a real Plus
/wham/usage reading at a used-up 5h window (the Team one is the only real
one), a Windows run.
2026-11-04 14:38:48 +08:00
..