brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
preset-skill-op-endpoint-capabilitiesBase URL / wire / provider / model / capability declaration shape versus credentials and live probes; includes proven Codex OAuth quota inspection with exact agent query routing and dated official-vs-measured context-window evidence.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: preset-skill-op-endpoint-capabilities description: Base URL / wire / provider / model / capability declaration shape versus credentials and live probes; includes proven Codex OAuth quota inspection with exact agent query routing and dated official-vs-measured context-window evidence. version: 2.0.0 last_changed_at: "2026-09-29T00:00:00Z" related_files:
Every built-in preset's manifest.llm declares a fixed set of fields; this
child names what each one is and is not, so provider children can link here
instead of re-explaining the shape every time.
provider — one of the four families the kernel accepts: openai,
anthropic, codex, claude-code. It selects the adapter; it is not
itself a credential. Vendor-named providers (custom, deepseek,
minimax, openrouter, ...) are rejected by the kernel; other vendors are
reached through openai/anthropic with their compatible base_url.model — the exact model string sent to the endpoint. codex and
claude-code use curated picker catalogs (Codex OAuth models, Claude CLI
aliases); openai and anthropic are free text because the endpoint is
arbitrary.base_url — the endpoint the adapter calls. Optional for openai
(official https://api.openai.com/v1, SDK-style with its own version path)
and anthropic (official https://api.anthropic.com, /v1/... appended);
codex uses its /backend-api/codex route; claude-code has none.wire_api — openai family only: chat_completions (default,
written explicitly) or responses; responses_transport (http default,
or websocket) applies only to the Responses wire. The retired
api_compat field is no longer read by the kernel and is never written by
the TUI.thinking / service_tier — standard reasoning effort for openai
and anthropic (none..xhigh, omitted = kernel default); Codex keeps its
low..xhigh ladder with an explicit xhigh default. service_tier
(fast → priority) applies to openai and codex only.capabilities.vision / capabilities.web_search / capabilities.skills
— opt-in capability declarations, not proof the underlying model actually
performs an image/search call correctly. Templates declare
web_search: duckduckgo and vision: inherit (the agent's own provider and
credentials) rather than any per-vendor capability provider. A capability
being wired only means the kernel will attempt the corresponding route;
whether the live call succeeds is a runtime fact, not a manifest fact.These declaration fields answer "what will be called and how" — they are distinct from:
api_key_env (env-var name, not a value),
codex_auth_path (which bound OAuth token file, not its contents), or
local CLI login state (claude-code). See ResolveRefsWithAuth
(tui/internal/preset/preset.go) for how credential validity
(not the declaration) is judged per-provider — keyed providers check
existingKeys[envName], codex checks OAuth state
(per-account when AuthState.CodexAuthDir is set, else the global
CodexOAuthConfigured bool), claude-code checks
ClaudeCodeAuthConfigured./doctor /
runtime concept, not something Save performs — see
reference/operations/availability-save-gate/SKILL.md.A preset can be declaration-complete and credential-valid yet still fail a
live probe (provider outage, model retired, quota exhausted) — route a
"does this actually work" question to /doctor, not this skill, and
route "what value/env-var/endpoint does this template even use"
back to the specific provider child instead of guessing here.
This is proven, verified evidence about the installed Codex CLI's own quota surface — not an assertion that a particular TUI/kernel adapter or running session exposes it. The direct app-server operation below remains the source route; verify any adapter-facing convenience surface against the running implementation instead of inferring it from this manual.
An agent that needs live Codex OAuth quota/rate-limit data must:
initialize handshake first (clientInfo
required; capabilities optional) — account/rateLimits/read is only
valid after initialize, not before.account/rateLimits/read request. Its params are
structurally null — the JSON-RPC schema fixes
"params": {"type": "null"} for this method, so the call carries no
request body beyond id/method. Do not invent request fields for it.GetAccountRateLimitsResponse: a required
rateLimits (backward-compatible single-bucket RateLimitSnapshot),
optional rateLimitsByLimitId (the same snapshot shape keyed by
limit_id, e.g. "codex"), and optional rateLimitResetCredits.
Each RateLimitSnapshot carries primary/secondary RateLimitWindow
objects (usedPercent required; windowDurationMins/resetsAt
nullable), plus planType, limitId, limitName,
rateLimitReachedType, credits (CreditsSnapshot: hasCredits,
unlimited, nullable balance), and individualLimit
(SpendControlLimitSnapshot).account/rateLimits/updated
server notification for the same AccountRateLimitsUpdatedNotification
shape (a rateLimits snapshot) — but treat it as a sparse rolling
merge signal, not a substitute for step 2: per its own schema
description, a client should merge available values into the most
recent account/rateLimits/read response (or refetch), and a nullable
field being absent in one notification does not mean it cleared a
previously observed value./status slash command inside the Codex TUI — useful for a
human to cross-check, not a programmatic substitute for step 2.codex doctor --json does NOT expose any of this. It emits a
redacted installation/config/auth/runtime health report with no
rate-limit, quota, or usedPercent-shaped field. Do not route an agent
there for quota.usedPercent, windowDurationMins, resetsAt,
planType, limitId, limitName, rateLimitReachedType, the
CreditsSnapshot/SpendControlLimitSnapshot fields) is account-level
usage/plan metadata — none of it is a token or credential, and none
of it should ever be paired with the OAuth token file's contents or
absolute path when reported back to a user.codex display rules already allow
(label → email → default/slug) — do not read account identity out of
this response; it is a rate-limit/credits payload, not an identity one.rateLimitResetCredits.credits can be null (only availableCount
known) even when credits exist — do not infer "no reset credits" from a
missing credits array.Two different numbers answer two different questions; keep them separately qualified and never let one stand in for the other:
gpt-5.6-sol, codex-cli 0.144.3,
low reasoning effort, synthetic filler payload, measured 2026-07-19.
Evidence (tokenizer o200k_base 0.12.0, all values from live
turn.completed/error events, not estimated):
turn.completed.input_tokens=312684,
cached_input_tokens=9984, output_tokens=12,
reasoning_output_tokens=0).CONTEXT_PROBE_359K_OK; total input 371684, cached 9984, output
12, reasoning 0).372684).The app-server request/response/notification shapes above come from the
Codex app-server's own generated JSON Schema definitions
(GetAccountRateLimitsResponse, AccountRateLimitsUpdatedNotification,
InitializeParams, and the ClientRequest/ServerNotification protocol
union listing the exact account/rateLimits/read /
account/rateLimits/updated method names and the request's params: null
shape) — read directly, not reconstructed from binary strings. The
context-window PASS/FAIL evidence above comes from a targeted, read-only
synthetic probe directory (JSON-RPC event logs plus prompt manifests
recording tokenizer, verified_user_tokens, and sha256 per probe);
its exact machine-local path is intentionally not reproduced in this
skill's portable frontmatter/prose — describe it as "the 2026-07-19
Codex OAuth context-window probe evidence" if a pointer is needed.
For the installed-CLI facts (codex --version → codex-cli 0.144.3,
codex doctor --json's actual redacted-report scope), read-only discovery
was run directly against the locally installed @openai/codex package —
codex doctor --json was executed and its output inspected for any
rate-limit/quota/usedPercent-shaped key (none present); codex doctor --help confirms --json is scoped to "a redacted machine-readable
report" about installation/config/auth/runtime, not usage/quota.
Re-verify both the schema shapes and the measured boundary against the actually-installed Codex version and current date before relying on exact field names or the 372K figure in new code — the schema is app-server-internal surface, not a versioned public API, and the measured boundary is a snapshot, not a specification.
If an adapter/runtime consumer of this data is built later, per-OAuth account:
remaining = max(0, 100 - usedPercent) as the headline number.This section documents the direct Codex source operation independently of
any adapter convenience surface. If the running adapter exposes equivalent
quota telemetry, verify its fields and version against this source contract;
otherwise use the exact app-server sequence above. See
reference/codex/SKILL.md for the provider-specific routing and
account-safety boundaries.
For why Save never tests these declarations against a real provider
call — and where that live diagnosis actually happens — see
reference/operations/availability-save-gate/SKILL.md.