Repository navigation
feat(codex): pick, clear and auto-assign each LazyCodex role's reasoning effort - #6960
Conversation
- PUT /api/codex-agent-roles/{role} treated null like an omitted effort and kept the pin; null now removes model_reasoning_effort and the omo.jsonc reasoning
- Codex resolves a role without its own effort from the spawn value, the [agents] default or the parent, so the docs, structure contract and test name no longer promise the model default
- structure/clients/integrations.md listed the reasoning cases without the null that removes it along with the role file's override
…nc settings
- The route and helper fixtures held only model and reasoning, so rebuilding the role as { model } on null would have passed
A role whose file sets no model_reasoning_effort got a model and no effort, so applying the proposal left the effort to Codex's default even though the sizing had chosen one. Roles now always get the sized effort on the picked model's ladder, as the delegation suggestion already did, and the alwaysProposeEffort switch that told the two apart is gone.
…el has a ladder - structure/subagents.md still limited role effort proposals to files that already set model_reasoning_effort
The role table showed and saved the model only, so the effort in the role file could be changed only by hand or through auto-assign. Each row now has an effort picker beside the model, offering the same levels as the Subagents page's delegation model, and the current pin reads "model · effort".
With the effort picker in its own column the table outgrew a 390px screen and Save scrolled out of view. Model, effort and Save now share one cell that wraps, as the model picker and Save did before.
…t field - The seeded role list lacked efforts, so the effort picker spread undefined and the placement test crashed
- The hint still said Save rewrites only the model line, which the effort picker made false; every locale follows
- Picking just a reasoning effort enables Save, sends the effort with the unchanged model, and shows both in Current
- A failed /api/injection-model read rejected the whole load; the table now falls back to each row's pinned effort
- A mirror retry rebuilt its body from the row, which still held the old effort until the reload landed or after it failed, so Retry could undo the saved effort; the drafts and the retry now keep the saved model and effort until a mirror succeeds
- A model-only save resent the pinned effort, so a pin the server does not declare made the model change fail with invalid_effort; the PUT now carries effort only when it changed, the row still shows the pin, and a mirror retry resends exactly the submitted body
- The integrations guide named only the model mirror; a GUI save also writes reasoning when the effort changed and LazyCodex supports it
…g BOM Clearing a role effort with a null PUT deleted only the opening line of a multiline value, so the edit failed the post-write parse with 409 invalid_role_file, and clearing a first-line effort dropped the BOM. Refuse a value without a one-line span with unsupported_model_value, as the setter does, and keep the BOM. Co-authored-by: LilMGenius <smsmeee@naver.com>
…d saves Every row offers Inherit effort, which sends effort: null. An unchanged effort is omitted, a null auto-assign proposal stays omitted, a pending omo.jsonc mirror retry survives a model change, and a successful save is published into the role store so a failed reload cannot show a stale pin. Co-authored-by: LilMGenius <smsmeee@naver.com>
Align the integrations guide and subagent contract with the carried behavior. Co-authored-by: LilMGenius <smsmeee@naver.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The reviewed changes are mergeable after normal checks; applying a proposal without an effort choice preserves the role’s existing setting. Pre-merge checks |
|
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
… effort line Clearing an unterminated last model_reasoning_effort line spliced it out with its preceding newline, leaving a bare CR in a CRLF file (409 invalid_role_file) and dropping the final newline in an LF file. Empty the line instead. Co-authored-by: LilMGenius <smsmeee@naver.com>
Resolve a pending omo.jsonc retry's effort inside save, so an auto-assign Apply with no effort proposal carries it too instead of clearing the retry with a model-only PUT. Co-authored-by: LilMGenius <smsmeee@naver.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55bde3dc6d
ℹ️ 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".
| const changed = draft !== "" && draft !== row.model; | ||
| const retryMirror = !changed && draft !== "" && mirrorRetries[row.role] === draft; | ||
| const effortDraft = effortDrafts[row.role] ?? row.effort ?? ""; | ||
| const changed = draft !== "" && (draft !== row.model || effortDraft !== (row.effort ?? "")); |
There was a problem hiding this comment.
Allow effort-only saves for roles without model pins
When a role inherits its model (row.model === null) but has a pinned model_reasoning_effort, draft is empty, so this condition remains false even after the user selects Inherit effort or another effort; Save stays disabled unless the user also chooses and pins a model. Such roles are valid and already represented by the response shape, so clearing or changing their effort should not require replacing model inheritance with a model pin; support an effort-only update through the UI/API instead.
AGENTS.md reference: gui/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
|
Maintainer integration into
Correction: the open Codex finding at |
Restores the fr, ja, ko, ru, tr, zh-cn and zh-tw LazyCodex role reasoning-effort sections from #6907 that #6960 did not carry, corrected to the behavior on dev: the per-locale "Inherit effort" label, the null clear and its 409 unsupported_model_value refusal, auto-assign proposing an effort for every sized role, an empty ladder never clearing a pin, and the Retry omo.jsonc button including a carried null. The English guide gains the matching Retry omo.jsonc paragraph. Co-authored-by: LilMGenius <smsmeee@naver.com>
…inning a model (#6975) A LazyCodex role that inherits its model but pins model_reasoning_effort could not change or clear that effort: Save required a non-empty model draft and PUT /api/codex-agent-roles/{role} required a model. Such a row can now save an effort on its own and keeps inheriting its model. model is optional on the PUT route: omitting it leaves the role file's model pin and the omo.jsonc model untouched, omitting effort keeps the effort, and null effort clears it. A request with neither is refused with 400 empty_update before either file is read, and model: null with 400 invalid_model, because a save never removes a model pin. The omo.jsonc mirror only changes reasoning on an effort-only save. Model-only saves, auto-assign Apply, the mirror retry and ocx agent roles set behave as before. The omoComments string in all 11 GUI locales no longer names .model. Resolves the open review finding on #6960 (discussion_r4243110906).
Summary
Carries LilMGenius's LazyCodex role reasoning-effort series (#6909, #6908, #6907) onto current
devas one change, with fixes from exact-head review. Supersedes #6907, #6908 and #6909.model · effort. Every row offers Inherit effort, which clears a pinned effort.PUT /api/codex-agent-roles/{role}keeps the pin wheneffortis omitted, sets it for a level, and withnullremoves the rootmodel_reasoning_effortline and the omo.jsoncreasoning. Codex then resolves effort normally (spawn value,[agents]default, parent).--apply/Apply inserts or replaces it. An empty ladder proposes nothing and Apply leaves the pin alone; a null proposal never clears.Maintainer fixes on top, each reproduced on the contributor head before fixing:
invalid_role_file; clearing a first-line effort dropped the BOM. It now refuses a value that is not a one-line string with 409unsupported_model_value(same as the setter) and keeps the BOM.highand omo.jsonclow. The retry's effort now rides along with the next save.structure/subagents.mdnow match the behavior.Co-authored-by: LilMGenius smsmeee@naver.com
Verification
bun run typecheck: exit 0.bun run lint,bun run lint:i18n,bun run build: exit 0.bun run structure:check,bun run skill:surface:check,bun run privacy:scan,git diff --check: exit 0.cd gui && bun test tests: 3264 pass, 0 fail (338 files). Fullbun run test: running; result will be added here.unterminated last effort line,resends an effort whose omo.jsonc mirror is still pending).OPENCODEX_HOME/CODEX_HOME/HOMEin a temp dir, LazyCodex detected, three roles,explorerpinned tohigh):Checklist
Summary by CodeRabbit