Skip to content

feat: recover Codex observed model from the session rollout - #5

Merged
shiftynick merged 2 commits into
mainfrom
feat/codex-observed-model
Aug 20, 2026
Merged

shiftynick merged 2 commits into
mainfrom
feat/codex-observed-model

Conversation

@shiftynick

Copy link
Copy Markdown
Owner

@
Codexs JSON event stream carries no model field, so structured Codex results
previously had no modelObserved at all. This recovers the effective model from
the session rollout file, which records it on every turn_context line (last one
wins), resolved under CODEX_HOME or ~/.codex.

Runs that persist no rollout report no observed model rather than echoing the
requested one, keeping attribution honest for independence checks.

Also releases 0.6.2: README + CHANGELOG entries and synchronized version sources.

Verification

  • bun run check — 122 pass / 4 skip / 0 fail, build, compiled-CLI package tests
  • npm pack --dry-run, npm run audit:prod — 0 vulnerabilities

🤖 Generated with Claude Code
@

shiftynick and others added 2 commits August 20, 2026 08:17
Codex's JSON event stream carries no model field, so codex was the only
adapter that never set modelObserved and requested-vs-observed
attribution could not be reconciled for it. The effective model is
recorded on every turn_context line of the session rollout file, so the
adapter now looks the rollout up by thread id (CODEX_HOME-aware,
date-partition scan newest-first) and reports the last turn's model.

Ephemeral runs persist no rollout, so their attribution stays honestly
absent rather than echoing the request - callers who need attribution
should run codex with a persistent session.

Live-verified: a persistent gpt-5.6-sol run reports
modelObserved: gpt-5.6-sol. Unit tests cover the rollout-present and
rollout-absent paths; 122 pass / 0 fail.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release: 0.6.2 with codex observed-model attribution

Document the Codex rollout-based model recovery in README and CHANGELOG, and
synchronize package.json, package-lock.json, and src/version.ts on 0.6.2.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@
@shiftynick
shiftynick merged commit 9aa975a into main Aug 20, 2026
3 checks passed
@shiftynick
shiftynick deleted the feat/codex-observed-model branch August 20, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant