Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ Fields live in `~/.codex/ucode.config.toml` and `/etc/codex/managed_config.toml`
| `model_catalog_json` | Create/replace | Create/replace | In `~/.codex/config.toml`; `ug`'s own catalog reference, for a static model list |
| `otel.trace_exporter` | Ignore | Create/replace | In `~/.codex/config.toml` on Linux when the config enables tracing, for Codex desktop; another exporter and other telemetry settings left alone |
| `mcp_servers` | Ignore | Merge | Managed file; add/update the config's MCP server entries, other entries left alone |
| Smart Router and Smart Router Orchestrator hooks | Merge | Merge | Launch-only `PreToolUse`, plus `UserPromptSubmit` and compact `SessionStart` with `ENABLE_SMART_ROUTER_ORCHESTRATOR=1`; Codex combines them with its native hook sources and applies project trust; `features.hooks` is enabled for a smart-routed launch |
| Smart Router and Smart Router Orchestrator hooks | Merge | Merge | Launch-only `PreToolUse` and `PostToolUse`, plus `UserPromptSubmit` and compact `SessionStart` with `ENABLE_SMART_ROUTER_ORCHESTRATOR=1`; Codex combines them with its native hook sources and applies project trust; `features.hooks` is enabled for a smart-routed launch |

</details>
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,21 @@ is enabled, ug warns and falls back to subagent routing because the first-prompt
wrapper requires a Unix terminal.
The generated shell hooks expect Git Bash; PowerShell-only setups are not covered.

Smart-routed interactive Codex sessions preserve a routed child's model and reasoning
effort through native `close_agent` / `resume_agent` and subsequent `send_input`, including
routed descendants. Both routing modes use the Codex app-server; subagent-only routing
keeps the parent's model. UG passes the working directory to the remote TUI so Codex
can show its normal folder-trust prompt and resolve the initial sandbox from its current
configuration. Explicit `--cd`/`-C` and permission options are preserved.
Codex must trust the generated hooks. If settings cannot be
restored, UG blocks the follow-up with a retry message.

This protection is verified with Codex 0.159.3 and requires its native thread-settings APIs.
It covers children created through UG's smart-routing launcher, including later resumes
in another smart-routed launch against the same workspace. Direct Codex, `codex exec`,
explicit-model launch bypasses, and standalone evaluation plugins do not acquire the guard.
Native multi-agent v2 retains its own saved-settings restore path.

### Smart Router Orchestrator

Use `SMART_ROUTER_CONFIG_VERSION` at launch to select a smart-routing configuration.
Expand Down
Loading
Loading