Repository navigation
feat: typed builders for reasoning, verbosity, rollout budget and approvals reviewer - #180
Merged
Merged
Conversation
…rovals reviewer Exec, ExecResume, ExecFork and Review gain reasoning_effort/2, reasoning_summary/2, verbosity/2, approvals_reviewer/2 and rollout_budget/2. Each emits a -c config field with its value checked before spawning (values checked on codex-cli 0.149.0, 0.164.0 and 0.165.0). The fields share one config_fields map per builder. Typed fields follow config/2 entries, and codex applies repeated -c last-wins, so a typed builder wins for the same key. The Exec comment that said the opposite is corrected. CodexWrapper.exec/2, review/1 and Session accept the same options. mix codex.contract probes the three closed sets with sentinels, model_reasoning_effort with an empty string, and features.rollout_budget with a table holding an unknown field. Closes #146
joshrotenberg
force-pushed
the
feat/146-typed-config
branch
from
November 10, 2026 21:52
ebe98d3 to
f287f3c
Compare
joshrotenberg
marked this pull request as ready for review
November 10, 2026 21:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #146.
Plan
Typed builders for config fields that today go through
config/2as raw strings, onExec,ExecResume,ExecForkandReview(each subcommand reads-c):reasoning_effort/2-c model_reasoning_effort="<effort>"reasoning_summary/2-c model_reasoning_summary="<v>":auto,:concise,:detailed,:noneverbosity/2-c model_verbosity="<v>":low,:medium,:highapprovals_reviewer/2-c approvals_reviewer="<v>":user,:auto_review,:guardian_subagentrollout_budget/2-c features.rollout_budget={enabled=true,...}:limit_tokensand non-empty list of positive integers:reminder_at_remaining_tokens(both required by codex), optional positive:sampling_token_weightand:prefill_token_weightInvalid values raise
ArgumentError. Values were checked on codex-cli 0.149.0, 0.164.0 and 0.165.0 with--strict-configand an isolatedCODEX_HOME.config_fieldsmap per builder, so the structs do not grow by five fields.config/2entries, and codex applies repeated-clast-wins, so a typed builder wins over aconfig/2entry for the same key. This matches howapproval_policy/2andsearch/1,2already behave; the comment inExecthat says the opposite is corrected.CodexWrapper.exec/2,review/1andSessionaccept:reasoning_effort,:reasoning_summary,:verbosity,:approvals_reviewerand:rollout_budget.mix codex.contract: the three closed sets join@enum_config_keys;model_reasoning_effortis probed with""(codex: "reasoning_effort must not be empty");features.rollout_budgetis probed with a table holding an unknown field, which codex rejects as a malformedfeatures.rollout_budgetrather than an unknown configuration field.