From 857d280b6f333fd9b8c81d632c0ed2e3512273d7 Mon Sep 17 00:00:00 2001 From: Hanbin Noh <282618027+hanbinnoh@users.noreply.github.com> Date: Fri, 7 Aug 2026 18:59:25 +0900 Subject: [PATCH 1/9] feat(v2): add Ultra mode toggle for proactive delegation on every model/effort Expose codex-rs features.multi_agent_v2.multi_agent_mode_hint_text through the OCX config editor, /api/v2, the ocx v2 CLI, and the Subagents GUI. The upstream field overrides the effort-derived multi-agent policy (ultra -> Proactive, else ExplicitRequestOnly) with custom text, so any model and any reasoning effort can run the Proactive delegation prompt. - features.ts: generalize the v2 string-field reader/writer and add get/setMultiAgentModeHintText (dedicated table, inline table, bare-boolean upgrade, CRLF/EOL preservation). - agent-settings-routes.ts: GET /api/v2 reports multiAgentModeHintText; PUT accepts string|null and rejects empty/whitespace strings (a present empty override would suppress even the ultra-derived Proactive message). - cli/v2.ts: ocx v2 mode-hint and status line. - GUI: Ultra mode switch + editable text + preset restore on the Subagents page, disabled until multi_agent_v2 is enabled. - tests: reader/writer encodings, clear semantics, inline-table tricky values, API GET/PUT/400 validation, CLI mode-hint round-trip. --- .../SubagentDelegationSection.tsx | 48 +++++++ .../SubagentsWorkspace.tsx | 6 +- gui/src/i18n/de.ts | 7 + gui/src/i18n/en.ts | 7 + gui/src/i18n/ja.ts | 7 + gui/src/i18n/ko.ts | 7 + gui/src/i18n/ru.ts | 7 + gui/src/i18n/zh.ts | 7 + gui/src/pages/Subagents.tsx | 57 ++++++++- gui/src/pages/use-subagent-delegation.ts | 11 ++ src/cli/v2.ts | 33 ++++- src/codex/features.ts | 54 ++++++-- .../management/agent-settings-routes.ts | 21 ++- tests/codex-v2-gate.test.ts | 120 ++++++++++++++++++ 14 files changed, 374 insertions(+), 18 deletions(-) diff --git a/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx b/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx index 2cf672b93..f19a7091f 100644 --- a/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx +++ b/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx @@ -10,6 +10,7 @@ import { Select } from "../../ui"; import { useT } from "../../i18n/shared"; import { formatNamespacedModelId } from "../../provider-icons"; import type { DelegationPatch, DelegationModelOption } from "../../pages/use-subagent-delegation"; +import type { UltraModePatch, UltraModeState } from "../../pages/use-subagent-delegation"; export interface SubagentDelegationSectionProps { model: string; @@ -20,6 +21,8 @@ export interface SubagentDelegationSectionProps { syncCodexDefaults: boolean; saving: boolean; onSave: (patch: DelegationPatch) => void; + ultraMode: UltraModeState; + onUltraModeSave: (patch: UltraModePatch) => void; } export default function SubagentDelegationSection({ @@ -31,8 +34,11 @@ export default function SubagentDelegationSection({ syncCodexDefaults, saving, onSave, + ultraMode, + onUltraModeSave, }: SubagentDelegationSectionProps) { const t = useT(); + const ultraOn = ultraMode.hintText !== null; return (
@@ -100,6 +106,48 @@ export default function SubagentDelegationSection({
+ +
+
+
{t("sub.ultraMode")}
+
{t("sub.ultraModeHint")}
+
+ +
+ {ultraOn && ( +
+