Skip to content

feat(codex): expose reasoning mode in webui - #61625

Closed
ruizanthony wants to merge 1 commit into
NousResearch:mainfrom
ruizanthony:fix/codex-reasoning-mode-webui
Closed

feat(codex): expose reasoning mode in webui#61625
ruizanthony wants to merge 1 commit into
NousResearch:mainfrom
ruizanthony:fix/codex-reasoning-mode-webui

Conversation

@ruizanthony

@ruizanthony ruizanthony commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Codex-only reasoning mode picker for standard / pro in the WebUI chat sidebar
  • hide the mode control for non-openai-codex providers while preserving the existing reasoning-effort picker unchanged
  • persist agent.reasoning_mode and load it only for openai-codex gateway/TUI sessions
  • send reasoning.mode only to the Codex Responses backend; non-Codex Responses requests keep their existing payload

Review fixes

  • rebuilt the PR as one focused commit on current main
  • removed the unrelated commentary-stream test rewrite that raised TypeError
  • removed the unrelated WebUI max reasoning-effort change
  • added component-level Codex-versus-non-Codex visibility coverage plus a parent-wiring guard

Validation

  • scripts/run_tests.sh tests/agent/transports/test_codex_transport.py tests/gateway/test_runtime_config_env_expansion.py tests/hermes_cli/test_config.py tests/test_tui_gateway_server.py tests/run_agent/test_run_agent_codex_responses.py — 629 passed
  • npm test -- --run — 74 passed
  • npm run typecheck
  • npm run build
  • ESLint on the five changed WebUI files
  • Ruff on the eight changed Python files
  • python -m compileall -q agent/transports/codex.py gateway/run.py hermes_cli/config.py tui_gateway/server.py
  • git diff --check

Notes

reasoning.mode is validated as standard or pro and is deliberately scoped twice: when loading config for openai-codex, and again when building a Codex-backend request. Other providers continue receiving only their existing reasoning payload.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery comp/dashboard Web dashboard / control panel UI (dashboard/, landing) provider/openai OpenAI / Codex Responses API codex labels Jul 9, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the focused Codex dashboard work. The feature remains needed: live main's ReasoningPicker defaults showMode to false (web/src/components/ReasoningPicker.tsx:55), and its parent does not pass that prop (web/src/components/ChatSidebar.tsx:345-356).

Problems

  • tests/run_agent/test_run_agent_codex_responses.py:726 passes on_commentary_message to _consume_codex_event_stream, but the PR head's function signature (agent/codex_runtime.py:597-606) has no such parameter and this PR does not modify that file. The changed commentary tests will fail with TypeError.
  • The branch is substantially stale relative to live main. Main already contains the transport/TUI reasoning-mode pieces (agent/transports/codex.py:292-295), so salvage should avoid replaying those overlapping changes.

Suggested changes

  • Remove the unrelated commentary-stream test changes from this PR.
  • Re-scope the salvage to the missing ChatSidebar provider/showMode wiring and add a component-level Codex-versus-non-Codex visibility test.

Automated hermes-sweeper review.

Comment thread tests/run_agent/test_run_agent_codex_responses.py Outdated
@ruizanthony
ruizanthony force-pushed the fix/codex-reasoning-mode-webui branch from ce4c4ed to a27a746 Compare July 10, 2026 20:09
@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 11, 2026
@ruizanthony

Copy link
Copy Markdown
Contributor Author

Closing intentionally: reasoning.mode=pro is not usable with the openai-codex subscription backend, so exposing this control would be misleading. The local integration has also been removed.

@ruizanthony
ruizanthony deleted the fix/codex-reasoning-mode-webui branch July 18, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have provider/openai OpenAI / Codex Responses API sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants