Skip to content

Preserve parent model for generic Codex children and document native token practice - #902

Merged
seathatflowsinourveins merged 5 commits into
mainfrom
codex/token-practice-reviewed-20261008
Oct 9, 2026
Merged

seathatflowsinourveins merged 5 commits into
mainfrom
codex/token-practice-reviewed-20261008

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Generic Codex children previously received the template's rendered model default even when their active parent used another model. This draft removes agents.default_subagent_model, retaining the parent model_info.slug, Max child effort and native explicit spawn/role precedence. The behavior record names every current lane and role, qualifies unsupported-parent Max and older macOS boundaries, and makes no token or cache saving claim.

The CC Claude read's two P2 fixes correct the adopter guide and the renderer's CLI help. The record also requires F9's reviewed live-apply diff to delete the existing host key after landing; removing a template entry alone would leave that setting in a merge-style apply. The catalog now records a declined generic-model decision with live deletion explicitly pending. This PR does not read or edit the live host configuration or claim it has been applied.

Scope

  • Base commit for the final hot-file rebase: 06aca3df6c9ba0edea13719e4b7fb8169bba9838. The reviewed input head is 7ed603a7b2fb124e9d4ba9c02f0099c0aaa04010, originally based on aba02ec3456d383bcc2fc72883db098f9be7918a. J8 and both input-head micro reads stand; the final micro reads cover the rebase delta and this description.
  • Lane: lane:shared; the other lane's acknowledgement remains required before merge.
  • Core paths: adoption/templates/codex.config.template.toml, docs/token-practice.md, and existing tests test_render_config, test_codex_roles, test_task_model_routing.
  • P2 wording fixes: adoption/bootstrap.md and tools/adoption/render_config.py's module docstring, which supplies its CLI help. Renderer source and AST outside the docstring remain unchanged.
  • Current routing/history records: docs/decisions/2026-09-30-task-model-routing.md, 2026-09-30-sol-primary-quality-defaults.md, 2026-09-27-model-currency.md, and 2026-09-26-stack-agents-role-dispatch.md. The Sol-primary September paragraph is restored verbatim as history; its dated addendum describes current enforcement.
  • Tested dependent scope: catalogs/foundation/upstream-surface-dispositions.json and docs/decisions/2026-10-02-new-wsl-client-configuration.md. The prior metrics locator :290 fix and dated 402/362/211 projection remain. The generic-model catalog row now cites the required F9 deletion record, with no false applied-state claim.
  • manifests/evidence.json is refreshed through canonical register_file, including new registrations for tests/test_task_model_routing.py, docs/decisions/2026-09-30-sol-primary-quality-defaults.md, and docs/decisions/2026-09-30-task-model-routing.md. The hot-file rebase preserves main's entries together with this PR's registrations and updates.
  • The prior 92 token-practice lines and SHA256SUMS-pinned isolated-builder carrier remain byte-identical. A dated role-dispatch addendum clarifies the carrier's historical fallback comment without rewriting its pinned qualification.
  • Provenance pointers identify the state root, dated mutable registry reads, native fixture report, later pre-cue report and RTK help source. The dated north-star explicit model override is named as an exception. No 0.155.1 macOS native inheritance claim is made.
  • One final draft head. J8 at 7ed603a7 reported zero findings at confidence >=80, 31 below 80, and nine undeclared items; those nine are declared below. Both input-head micro reads are in. The required final reads cover only the rebase delta and description, followed by green CI and the CC's cue. 5f lands on cue; F9 applies after landing from a reviewed diff that deletes the live key.

J8 scope declarations

  1. tests/test_task_model_routing.py:86-87: D4_BINDINGS drops (USER_TEMPLATE, "agents.default_subagent_model"). The stricter assertNotIn at :279 also requires the generic model key to be absent from the template.
  2. tests/test_task_model_routing.py:319: the new assertion requires the generic-children record to be ("Codex CLI", "max"); the child model is inherited from the active parent and its default effort remains Max.
  3. tests/test_task_model_routing.py:56-58: SOL_ROUTES narrows from three explicit Sol routes to two because generic children no longer take a template-supplied model.
  4. manifests/evidence.json newly registers docs/decisions/2026-09-30-sol-primary-quality-defaults.md.
  5. manifests/evidence.json newly registers docs/decisions/2026-09-30-task-model-routing.md.
  6. adoption/templates/codex.config.template.toml:24-29 removes the Max/Ultra explanatory comment; this comment removal changes documentation only.
  7. The same template removes the pre-0.159.1 Astra caveat. Native inheritance acceptance here is limited to the reviewed Codex 0.161.0/0.162.0; the 0.155.1 macOS pin has rendering coverage only.
  8. tools/adoption/render_config.py --check against the existing live host will report drift until F9 applies the reviewed deletion after landing. Template omission alone does not delete an existing key during a merge-style apply. This is the declared pending-host effect; this lane has not run a live-host check or changed that host.
  9. docs/token-practice.md:153-244 adds operator directives for worktree-confined ctx_execute_file and shared-file reads through ctx_execute/ctx_batch_execute, bash -c around batches that start with for, native tool discovery, Serena session identifiers, cache attribution, and inferred hcom terminal approval states. The 92-line block remains byte-identical to the reviewed input head; its directives are explicitly within the native token practice scope.

J8 report: api-actions-20261008/readers/J8/pr902/run-20261009T031426Z/report.md, SHA-256 df3cbe1daae2c70e4bb5b074cf4d72e245c182535590ecce4bd50e8e84118f42. Line numbers above refer to the J8-reviewed input head. The existing method-level declaration table and recorded base-test failures remain part of this scope.

SOTA sources

Evidence-class table

Claim Evidence class Command / retained evidence
Omitted generic model retains parent slug; Max is validated against that parent's metadata source_review Tagged constructors and effort-only branch above; no unsupported-parent execution claim
Adopter guide and CLI help describe current template behavior local_integration Docstring-only renderer edit; native render_config.py --help; render, role and routing modules
F9 must delete the existing host key after landing source_review CC-reported live key, explicit deletion requirement and declined/pending catalog row; no live file read or mutation by this lane
Rebased-head pre-cue returns rc 1 for the eight declared base-version methods, with ten failing entries including platform subcases local_integration CC base_tests_at_head.sh on base 06aca3d and head d9fc3df: all three modified existing test files fail on that declared set; the ninth, quoted-value method passes
Catalog locators and WSL projections remain consistent local_integration Existing full upstream-surface and new-WSL configuration modules rerun
Current lane effects and qualified platform boundary source_review Dated registry/launcher/role sources; 0.161.0/0.162.0 source scope and explicit 0.155.1 qualification limit
Retained root/full-history routed-alias proof synthetic Existing fixture report and unchanged catalog; no new provider execution or measured savings
Prior 92-line guidance and pinned builder carrier remain intact local_integration Byte-preservation checks and existing role checks
Repository integrity at final head d9fc3df local_integration scripts/validate.py rc 0: 70 components, 10,920 hashed files, four profiles and 239 receipts; git diff --check rc 0; no live provider or GPU execution
All changed modules pass; the sixteen-module reader inventory retains one unrelated installed-client policy failure local_integration Each module ran under timeout 600 at the final head: 1,107 tests, 22 skips, one failure, zero errors; fifteen modules return 0, windows_terminal_defaults returns 1 for the existing plugin_notification decision-table gap
Rebase preserves reviewed lane content and main's manifest records local_integration All five commits are equal in git range-diff; all 13 non-manifest lane blobs remain identical to 7ed603a; manifest equals main plus this PR's three registrations and ten updates, with no removals or non-file metadata changes

Local commands run

Every module ran separately at final head d9fc3df9413795c8f61212066ef30bd9c6a3ebb4 under nice -n 10 ionice -c2 -n7 timeout 600 python3 -B -m unittest <module>. The 11 literal template readers were render_config, codex_roles, task_model_routing, skills_manifest, observability_tool_names, install_claude_profile, codex_worker_lane, codex_agents, currency_due_notice, windows_terminal_defaults and runtime_worker_openhands_push_gate. The five relevant indirect/dependent readers were upstream_surface_watch, new_wsl_client_config, adoption_status, adoption_contract and adoption_docs_consistency. All three changed modules passed. Across the sixteen modules, unittest reported 1,107 tests, 22 skips, one failure and zero errors; fifteen modules returned 0 and windows_terminal_defaults returned 1. No module timed out or was rerun.

nice -n 10 ionice -c2 -n7 timeout 600 python3 tools/adoption/render_config.py --help
# rc 0; revised root/child model description is printed

git diff --check
# rc 0

python3 scripts/validate.py
# final head d9fc3df9413795c8f61212066ef30bd9c6a3ebb4: rc 0
# 70 components, 10,920 hashed files, four profiles, 239 receipts
# integrity and scope checks only, no live provider or GPU execution

bash ~/.local/state/native-agent-stack/coordination/command-center/cc-tools/base_tests_at_head.sh /path/to/assigned/worktree 06aca3df6c9ba0edea13719e4b7fb8169bba9838 d9fc3df9413795c8f61212066ef30bd9c6a3ebb4 unittest
# run under nice -n 10 ionice -c2 -n7; rc 1
# Three failing files; eight declared methods, ten entries including platform subcases.
# render_config: five errors and one failure; codex_roles: one error;
# task_model_routing: two errors and one failure. No new or missing expected method.
# Quoted-value verification passes after the existing record correction.

The CC pre-cue tool's nonzero result is retained for the declared old expectations; it is not a passing check or a waived gate. The final micro reads and CC assess it alongside the changed-module results. Pre-cue output SHA-256: 2d81674220e8c899b242241222ba9f2ea6fbfc366cfef8e68b7e0908dd917d9e.

The unchanged installed-Claude plugin_notification decision-table failure in tests.test_windows_terminal_defaults.OverlayTests.test_the_installed_client_knows_no_notification_type_without_a_decision remains disclosed with its original-head reproduction. This PR does not suppress or repair that unrelated host policy. Final per-module results and log hashes are retained in the rebased-head receipt and sixteen-module report. The earlier native CLI-help result is retained from the reviewed input; its renderer blob remains identical after rebase.

Decision record

docs/token-practice.md, "Generic child model default omission", records behavior, every lane/role, the Max failure boundary, explicit F9 deletion, older-platform qualification limit, provenance and the exact pre-cue declarations. Routing/model/role-dispatch addenda preserve dated history. The live apply must leave the effective model key absent across contributing layers; a merge-style omission cannot clear an existing host value. No token or cache saving was measured.

Host evidence

No host receipt or platform-status change. The CC verified the existing live key; this lane neither read nor edited the host config.

Checklist

  • No workflow or permission change.
  • No secrets, request bodies or private absolute host paths published.
  • No paid hosting or billing surface introduced.
  • Peer-owned worktrees and pinned role qualification preserved.
  • Both CC P2s corrected; renderer behavior unchanged outside its docstring.
  • Required F9 deletion and pending catalog decision recorded without live access.
  • Changed test registration and relevant provenance/qualification boundaries included.
  • J8 and both micro reads at the input head complete; all nine J8 scope items declared above.
  • Final rebase-only micro reads, rebased-head pre-cue and green CI accepted.
  • One hot-file rebase onto 06aca3d completed at d9fc3df; reviewed lane blobs and main's entries preserved.
  • Other-lane acknowledgement and explicit CC cue completed.
  • 5f lands on cue; F9 applies the reviewed deletion only after landing.

@seathatflowsinourveins seathatflowsinourveins added the lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement label Oct 8, 2026
@seathatflowsinourveins seathatflowsinourveins changed the title docs: clarify native token observation and caller contracts Preserve parent model for generic Codex children and document native token practice Oct 9, 2026
@seathatflowsinourveins
seathatflowsinourveins force-pushed the codex/token-practice-reviewed-20261008 branch from 7ed603a to d9fc3df Compare October 9, 2026 04:26
@seathatflowsinourveins
seathatflowsinourveins marked this pull request as ready for review October 9, 2026 04:54
@seathatflowsinourveins
seathatflowsinourveins merged commit b7dfe63 into main Oct 9, 2026
36 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the codex/token-practice-reviewed-20261008 branch October 9, 2026 04:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T05:02:35.374154Z d9fc3df Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9fc3df941

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# (protocol/src/openai_models/reasoning_effort.rs and models-manager/models.json at the same pin). The child model is
# the coordinator's CODEX_MODEL, so a pin before 0.159.1 runs gpt-6-astra children at max.
default_subagent_model = "${CODEX_MODEL}"
# Generic children keep the parent step's model_info.slug; Max remains the default effort.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the default until the macOS pin is qualified

This shared template is also rendered for the pinned macOS Codex 0.155.1 client, but the cited inheritance evidence covers only 0.161.0/0.162.0; the new behavior record itself says at docs/token-practice.md:703-705 that 0.155.1 has no native inheritance qualification. Removing the model key nevertheless changes fresh macOS configurations, so generic children there no longer have the previously deterministic Astra model without evidence that this client inherits the parent correctly. Either retain the explicit default for that pin or qualify 0.155.1 before applying the omission to it.

AGENTS.md reference: AGENTS.md:L5-L7

Useful? React with 👍 / 👎.

Comment on lines +26 to +27
# Source: openai/codex rust-v0.162.0, codex-rs/core/src/agent/child_config.rs L115, L137, L204-249.
# The rust-v0.161.0 file is byte-identical (SHA256 33d4dd6f70e6640af1059398272c48b88e16e0005105fbd1ef13e30456d39a39).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the pinned child-config source locators

The immutable openai/codex@979011409de0a60b52f179721948e65531d26144 source referenced by this change does not place these operations at the stated lines: the parent-model assignments are at lines 109 and 129, generic defaults are selected around 193-195, and the effort-only branch is around 229-236. The same incorrect locators are repeated throughout the new decision evidence, so readers following the claimed primary source land on unrelated code; regenerate the locators and recorded digest from the actual pinned file.

AGENTS.md reference: AGENTS.md:L6-L7

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant