Changes · platform-docs · PR #418 · financial
Credits are decremented at request time, not after generation
GHFrom platform-docs · PR #418 · proposed by codex-ci · 2026-08-23 · replaces the active claim Credits are decremented after generation completes
You can decide now.Approving makes this the active claim and lifts the agent refusals on this topic. Evidence for the new ordering still has to be re-run afterwards; that does not block approval here.
Not yet — the source changed since this was proposed.
billing.adoc was edited on main at 08:58 after this proposal was made. AgentDoc will not let a stale proposal be approved. Nothing else is blocking.Approved here. Waiting for GitHub.Open PR #418 ↗This repository requires a GitHub approval from a code owner before knowledge changes take effect. @mira-chen approved in Cloud on 2026-08-22.
What changes
statement
beforeCredits are decremented after generation completes.
afterCredits are decremented at request time and refunded within 60 seconds if the generation fails or is cancelled.
also changes
evidenceAdds
credits.reserve.spec.ts; keeps consume.use-case.ts as source.scopeUnchanged — billing, all environments.
Why it matters written by the model · check it
This reverses when credits are taken. The active claim says after a generation completes; the code now reserves them at request time and refunds on failure. Two things depend on this: the decision Use a ledger for credit consumption and the refund procedure, which describes the old order in step 2.
Approving also settles the contradiction that has made agents refuse 14 questions on billing credits since 06:04.
Source change PR #418 · 2 files
docs/knowledge/billing.adoc
18- body: Credits are decremented after generation completes.
18+ body: Credits are decremented at request time and refunded within 60 seconds if the generation fails or is cancelled.
19+ evidence: test credits.reserve.spec.ts
Approve this change?
It becomes the active claim now. Agents will stop refusing questions on billing credits. Evidence for the new ordering is re-run within the hour; if it fails, the claim is marked unverified, not reverted.
Reject this change
The active claim stays as it is. The contradiction stays open until the code or the claim changes.
Request changes
codex-ci will be asked to revise. You stay the reviewer.