Skip to content

Preserve routed Codex child settings across resume - #1106

Draft
JJ27 wants to merge 8 commits into
mainfrom
JJ27/preserve-codex-child-route
Draft

JJ27 wants to merge 8 commits into
mainfrom
JJ27/preserve-codex-child-route

Conversation

@JJ27

@JJ27 JJ27 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

What did you change, and why?

Codex multi-agent v1 can restore a routed child with the parent's model and reasoning effort. With Codex 0.159.3, a child routed to gpt-5.1-codex-mini/high keeps those settings on a live follow-up, then changes to the parent's gpt-5.1/low after close_agent -> resume_agent -> send_input.

UG records routed child settings and snapshots them before native resume, including routed descendants. Native Codex still restores the agent tree. Before follow-up input, UG restores the saved model/effort through the thread-settings API and waits for confirmation. Failed restoration denies the follow-up; successful explicit model overrides remain effective. The confirmation wait uses its RPC deadline without racing the socket's connection timeout.

Both smart-routing modes use the app-server; subagent-only mode preserves the parent model. The remote TUI receives the working directory so native folder-trust onboarding runs. UG lets the server resolve Codex 0.154.0's stale initial read-only sandbox default after trust is granted. Explicit sandbox/profile/permission selections and resumed or later threads retain their settings. Hook commands use the launching Python installation.

The Claude preset CUJ waits for the parent's answer and then for all background tasks to finish. Its driver handles /tasks opening a single-agent detail panel, including when Left-arrow closes that panel to the input prompt: it reopens /tasks and still requires the empty state or a complete list of finished tasks. A completed detail panel cannot satisfy the wait while navigation is pending. The Codex evidence reader accepts same-turn native runtime-context updates, such as a date change at midnight, while rejecting additional user prompts.

Scope: UG's smart-routed interactive launcher. Direct/headless Codex and standalone evaluation plugins need separate integration; native multi-agent v2 retains its own restore path. Live gateway incidence and Windows/macOS native resume behavior remain unverified. Related: #1052 overlaps the launcher plumbing. This change uses existing native lifecycle/settings APIs without changing the multi-agent wire protocol.

How do you know it works?

  • scripts/reproduce_codex_resume.py reproduces the reset without the guard hooks. With real Codex 0.159.3 and UG hooks, provider requests and native settings verify live/resumed turns, a nested subtree across process restart, and unset effort. Native startup reproductions also check Codex 0.154.0 and 0.159.3, including explicit read-only settings. These use controlled local router/provider responses.
  • On head cde33921, 803 resume, launcher/hook, routing, and CLI tests passed, with no failures or skips. A broader 1,334-test focused run passed on 8c794d57 before main's routing-log update, including all 40 task-navigation PTY cases. Those cases cover repeated detail panels, delayed navigation, resumed children, and rejection of active or incomplete task lists; the terminal driver and its tests are unchanged in the final rebase.
  • The standard Ruff, formatting, and Ty gate passes. Supplemental runner-script lint reports two existing TID251 findings in scripts/run_integration.py, which is identical to main; its formatting and --help checks pass.
  • CI on head cde33921 passed all 50 jobs, including both required checks. The Windows Codex launch job passed after one rerun; its first attempt exceeded the existing 60-second timeout for databricks-gpt-5-nano. The logs do not establish the cause of that timeout.

Live workspace E2E was not run locally. The Codex toggle journey retains native parent-model, child-calculation, routing on/off/on, and normal-exit assertions.

@JJ27
JJ27 force-pushed the JJ27/preserve-codex-child-route branch 7 times, most recently from d79499e to d88b647 Compare October 15, 2026 21:47
@JJ27
JJ27 force-pushed the JJ27/preserve-codex-child-route branch from d88b647 to cde3392 Compare October 16, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant