Repository navigation
fix: Codex catalog honors app-server context caps - #98248
hannesrudolph wants to merge 1 commit into
Conversation
|
Codex review: blocked before merge. Reviewed October 2, 2026, 8:31 AM ET / 12:31 UTC (Revision 14). ClawSweeper reviewWhat this changesThe PR reads optional Codex model context metadata and maps native and effective limits into OpenClaw’s model catalog, with tests and documentation. Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this is maintainer-authored, protected work with a useful remaining goal. The upstream protocol prerequisite and current-main conflict resolution remain outstanding, and the documentation still overstates override behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin discovers account models through the Codex app-server. OpenClaw projects that metadata into model listings and context budgeting, alongside explicitly configured model limits. flowchart TD
A[Codex account models] --> B[App-server model list]
B --> C[OpenClaw metadata parser]
C --> D[Native model catalog]
D --> E[Context budget resolution]
F[Configured model limits] --> E
E --> G[Model display and budgeting]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +39, Tests +16, Docs +5. Total +60 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Publish verified native context metadata through the current harness-owned catalog while preserving explicit user limits and documenting their precedence accurately. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main’s model parser and native catalog omit the proposed context metadata, and this head’s tests establish that configured limits still take precedence. No live failure was executed in this read-only review. Is this the best way to solve the issue? No, as submitted: the projection targets the former provider catalog, and its documentation promises precedence the code does not implement. Adapting the same idea to the native catalog is preferable to changing global provider or override policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d1d4342228fc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This PR has been waiting since June on an upstream protocol prerequisite and conflict resolution with no new commits. Please reopen on current main once the app-server context metadata is available. If this change is still needed, please open a fresh PR against current |
Related: #93764
What Problem This Solves
Fixes an issue where users running the Codex harness could see OpenClaw model context display and budgeting based on stale local context metadata when Codex app-server has a smaller native effective context window.
This is the OpenClaw consumer side of the fix. It consumes Codex app-server context metadata when the app-server exposes it; older Codex app-server builds keep the existing fallback catalog behavior.
Companion Codex branch: https://github.com/hannesrudolph/codex/tree/codex-model-context-metadata
Why This Change Was Made
OpenClaw already has separate
contextWindowandcontextTokensmodel fields, which is the right boundary for native model metadata versus effective runtime caps. This change keeps that split and maps Codex app-servermodel/listcontext metadata into it instead of adding a model-specific clamp or changing global provider merge semantics.User Impact
When Codex app-server reports native/effective context metadata, OpenClaw model discovery can show and budget against the same runtime cap Codex uses internally. For GPT-5.5-style catalogs that means OpenClaw can represent
272000native context with258400effective context tokens instead of continuing to imply a stale 1M runtime budget.Evidence
pnpm docs:listnode scripts/run-vitest.mjs extensions/codex/provider.test.ts extensions/codex/src/app-server/models.test.tsgit diff --checkCodex companion branch proof:
just write-app-server-schemajust fmtPATH="$HOME/.cargo/bin:$PATH" just test -p codex-app-server-protocol -p codex-app-server model_listWhat was not tested:
pnpm check:changedwas not run.just testwas not run.model/listwith the new upstream fields was not tested because the companion Codex change is not merged/bundled yet.