Commit Graph

6993 Commits

Author SHA1 Message Date
Ahmed Ibrahim
fb3905f59d Fix explicit V2 spawn test thread ids 2026-05-29 12:42:13 -07:00
Ahmed Ibrahim
f41333434c Remove test-only multi-agent flag resolution 2026-05-29 12:33:31 -07:00
Ahmed Ibrahim
3abb77151d Reuse spawn options for fork runtime version 2026-05-29 12:30:50 -07:00
Ahmed Ibrahim
6a6a67f96a Fix direct session constructor test fixtures 2026-05-29 12:20:04 -07:00
Ahmed Ibrahim
1385f9d03f Carry resolved multi-agent version into child sessions 2026-05-29 12:08:26 -07:00
Ahmed Ibrahim
6f931a9cf1 Keep multi-agent depth separate from runtime version 2026-05-29 11:43:11 -07:00
Ahmed Ibrahim
ada487fb3d Import multi-agent runtime resolver in session tests 2026-05-29 11:30:00 -07:00
Ahmed Ibrahim
9abd55660e Centralize resolved multi-agent runtime version 2026-05-29 11:22:02 -07:00
Ahmed Ibrahim
7de051e1ec Keep multi-agent thread limits in config resolution 2026-05-29 11:09:42 -07:00
Ahmed Ibrahim
d926f6c05e Simplify inherited multi-agent runtime handling 2026-05-29 11:05:59 -07:00
Ahmed Ibrahim
e9ef90c361 Keep fork spawn options within clippy argument limit 2026-05-29 10:43:24 -07:00
Ahmed Ibrahim
8193bcf143 Make spawned agents inherit parent multi-agent runtime 2026-05-29 10:31:46 -07:00
Ahmed Ibrahim
e92ded1249 Merge remote-tracking branch 'origin/codex/model-info-multi-agent-version' into codex/model-info-multi-agent-version 2026-05-29 10:19:55 -07:00
Ahmed Ibrahim
7e7a9eb340 Use resolved multi-agent version across runtime 2026-05-29 10:19:34 -07:00
Ahmed Ibrahim
b3655164a5 Merge branch 'main' into codex/model-info-multi-agent-version 2026-05-29 09:15:32 -07:00
Ahmed Ibrahim
abca78f62e Merge remote-tracking branch 'origin/main' into codex/model-info-multi-agent-version
# Conflicts:
#	codex-rs/app-server/tests/common/models_cache.rs
#	codex-rs/codex-api/tests/models_integration.rs
#	codex-rs/core/src/session/review.rs
#	codex-rs/core/src/session/turn_context.rs
#	codex-rs/core/src/tools/spec_plan.rs
#	codex-rs/core/src/tools/spec_plan_tests.rs
#	codex-rs/core/tests/suite/model_runtime_selectors.rs
#	codex-rs/core/tests/suite/model_switching.rs
#	codex-rs/core/tests/suite/models_cache_ttl.rs
#	codex-rs/core/tests/suite/personality.rs
#	codex-rs/core/tests/suite/remote_models.rs
#	codex-rs/core/tests/suite/rmcp_client.rs
#	codex-rs/core/tests/suite/spawn_agent_description.rs
#	codex-rs/core/tests/suite/view_image.rs
#	codex-rs/models-manager/src/model_info.rs
#	codex-rs/protocol/src/openai_models.rs
#	codex-rs/tools/src/tool_config_tests.rs
2026-05-29 09:14:58 -07:00
sayan-oai
96f1347fa3 Show activity for standalone web search calls (#24693)
## Why

Standalone `web.run` calls run in the extension, so they need normal
web-search progress activity while a request is in flight and durable
completed activity after a thread is reloaded.

Follow-up to #23823; uses the extension turn-item emission path added in
#24813.

## What changed

- Emit standalone `web.run` start/completion items through the host
turn-item emitter, preserving standard client delivery and rollout
persistence.
- Include useful completion detail for queries, image queries, and
literal-URL `open`/`find` commands.
- Render completed searches as `Searched the web` or `Searched the web
for <detail>`, with snapshot coverage for the detail-free case.
- Extend the app-server round-trip test to verify completed search
activity is reconstructed by `thread/read` after a fresh-process reload.

## Testing

- `just test -p codex-web-search-extension`
- `just test -p codex-app-server -E
"test(standalone_web_search_round_trips_encrypted_output)"`
2026-05-29 16:12:58 +00:00
Ahmed Ibrahim
aad293503c codex: address PR review feedback (#25032) 2026-05-29 09:06:20 -07:00
Ahmed Ibrahim
5577a9e148 [codex] Add model tool mode selector (#25031)
## Why
Some models need to select their code-execution behavior through model
catalog metadata. Models without that metadata must continue to follow
the existing `CodeMode` and `CodeModeOnly` feature flags, including when
a newer server sends an enum value this client does not recognize.

## What changed
- add optional `ModelInfo.tool_mode` metadata with `direct`,
`code_mode`, and `code_mode_only`
- treat omitted and unknown wire values as `None`
- resolve `None` from the existing feature flags
- carry the resolved `ToolMode` directly on `TurnContext`, outside
`Config`
- use the resolved value for turn creation, model switches, review
turns, tool planning, and code execution

## Coverage
- add protocol coverage for omitted, known, and unknown enum values
- add focused coverage for flag fallback and explicit metadata
overriding feature flags
- add core integration coverage that fetches remote model metadata
through `/v1/models` and verifies the outbound `/responses` tools for
explicit `direct` and `code_mode_only` selectors

## Stack
- followed by #25032
2026-05-29 09:05:05 -07:00
Abhinav
251b2412b2 Render multiline hook output in TUI (#24965)
# Why

Fixes #24529. Completed hook output in the TUI rendered each
`HookOutputEntry` as one ratatui line, so explicit newlines inside hook
output were not shown as separate transcript rows. That made multiline
`SessionStart.additionalContext` hard to inspect even though the
model-facing context path preserved the original text.

# What

- Split completed hook output entries on explicit newlines before
rendering them in `codex-rs/tui/src/history_cell/hook_cell.rs`.
- Keep the hook output prefix, such as `hook context:` or `warning:`, on
the first physical line only.
- Preserve explicit blank lines and render continuation lines with the
hook body indent.
- Add unit coverage for multiline context and warning output, plus a
chatwidget snapshot regression for `SessionStart` history output.

# Testing

- `cargo nextest run -p codex-tui completed_hook_multiline
hook_completed_before_reveal_renders_completed_without_running_flash`
- `just argument-comment-lint -p codex-tui -- --ignore-rust-version
--lib --tests`
2026-05-29 15:12:40 +00:00
jif-oai
b40ad0d84d Remove stale rollout TODO tests (#25106)
## Summary

Remove a stale `TODO(jif)` block of commented-out rollout listing tests
that still referenced an older listing API.

The current rollout listing behavior is covered by the active state DB
and filesystem fallback tests, so keeping the dead commented tests just
adds noise.

## Validation

- `just fmt`
- `just test -p codex-rollout`
2026-05-29 17:09:00 +02:00
jif-oai
27e256bc40 Handle goal usage limits from turn errors (#25095)
## Summary
- handle goal usage-limit turn errors in the goal extension
- exercise the extension path in the goal backend test

## Tests
- just fmt
- just test -p codex-goal-extension
- just fix -p codex-goal-extension
2026-05-29 15:39:05 +02:00
jif-oai
1c55bb2702 [codex] Improve built-in tool schema docs (#24794)
## Summary
- Clarify default, omission, and bounded behavior across built-in tool
schemas, including unified exec, classic shell, Code Mode exec/wait,
multi-agent, agent job, MCP resource, image, goal, plan, tool_search,
and test-sync fields.
- Convert update_plan status to an enum and add short field descriptions
where the schema previously relied on surrounding context.
- Remove the dedicated permission-approval schema test and keep only
updates to existing expected-spec tests.

## Validation
- Ran `just fmt`.
- Ran `git diff --check`.
- Did not run clippy or tests, per request.

Regression has been eval
[here](https://openai.slack.com/archives/C09GDSP1J9X/p1779905065496949)
and we proved there are no regressions
2026-05-29 13:32:19 +02:00
jif-oai
3deda3116c fix: main (#25075) 2026-05-29 12:53:31 +02:00
jif-oai
191c39aa75 Drop debug-client prompt state tracking (#25070)
Deletes `codex-rs/debug-client/src/state.rs` as one step in removing the
stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:23 +02:00
jif-oai
43fa4e5d25 Remove debug-client server event reader (#25069)
Deletes `codex-rs/debug-client/src/reader.rs` as one step in removing
the stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:19 +02:00
jif-oai
5c1387846d Delete debug-client JSONL output helper (#25068)
Deletes `codex-rs/debug-client/src/output.rs` as one step in removing
the stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:16 +02:00
jif-oai
e2b8ec616a Remove the debug-client CLI entrypoint (#25067)
Deletes `codex-rs/debug-client/src/main.rs` as one step in removing the
stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:12 +02:00
jif-oai
3d3cc5a953 Retire debug-client interactive command parsing (#25066)
Deletes `codex-rs/debug-client/src/commands.rs` as one step in removing
the stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:09 +02:00
jif-oai
1197c7d654 Delete debug-client app-server process plumbing (#25065)
Deletes `codex-rs/debug-client/src/client.rs` as one step in removing
the stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:05 +02:00
jif-oai
a9a92cbb0a Remove the generated debug-client README (#25064)
Deletes `codex-rs/debug-client/README.md` as one step in removing the
stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:51:01 +02:00
jif-oai
fc8c723553 Drop the stale debug-client manifest (#25063)
Deletes `codex-rs/debug-client/Cargo.toml` as one step in removing the
stale app-server debug client.

This intentionally leaves Cargo workspace and lockfile cleanup for a
later follow-up PR.
2026-05-29 12:50:58 +02:00
jif-oai
8f6a945ec9 Use inject_if_running for active goal steering (#24924)
## Why

This PR is stacked on #24918, which moves goal steering onto
source-labeled internal model context fragments. Active-turn goal
steering should use the same running-turn injection path as other
runtime steering, so those fragments enter the pending input queue as
`ResponseItem`s through the existing
[`Session::inject_if_running`](8d6f6cdf69/codex-rs/core/src/session/inject.rs (L12-L27))
behavior instead of through a goal-specific conversion wrapper.

## What Changed

- Exposes a narrow `CodexThread::inject_if_running` bridge for callers
that only hold a thread handle.
- Changes `ext/goal` active-turn steering to pass `ResponseItem`s
directly.
- Builds goal steering prompts as contextual internal model context
`ResponseItem`s before injecting them into the running turn.

## Testing

Not run locally; PR metadata update only.
2026-05-29 11:24:39 +02:00
Ahmed Ibrahim
ebe85c8af5 codex: assert serialized v1 namespace tool order 2026-05-29 01:31:33 -07:00
Ahmed Ibrahim
6261f33a4f codex: fix CI failure on PR #25032 2026-05-29 01:30:58 -07:00
Ahmed Ibrahim
a50eb62cd0 [codex] Add multi-agent selector integration coverage 2026-05-29 01:30:58 -07:00
Ahmed Ibrahim
581291bf68 [codex] Inline multi-agent version resolution 2026-05-29 01:30:58 -07:00
Ahmed Ibrahim
129b77b71b [codex] Resolve multi-agent version on turn context 2026-05-29 01:30:58 -07:00
Ahmed Ibrahim
512655e4b0 [codex] Simplify multi-agent version selection 2026-05-29 01:30:57 -07:00
Ahmed Ibrahim
1f68c3dbdd [codex] Add model multi-agent version selector 2026-05-29 01:30:57 -07:00
Ahmed Ibrahim
e558c37be5 codex: assert direct selector behavior independent of shell family 2026-05-29 01:30:56 -07:00
jif-oai
740d942f90 Use internal model context fragments for goal steering (#24918)
## Why

Goal steering is one form of runtime-owned model context, but the old
`<goal_context>` wrapper made the contextual-fragment hiding path
goal-specific. Using a source-labeled internal context fragment gives
core and extensions a shared shape for hidden model steering while
keeping those prompts out of visible turn history.

The change also keeps legacy `<goal_context>` messages recognized as
hidden contextual input so existing stored history does not start
rendering old goal-steering prompts as user-visible turn items.

## What Changed

- Replaces `GoalContext` with `InternalModelContextFragment` plus a
validated `InternalContextSource`.
- Renders goal steering as `<codex_internal_context
source="goal">...</codex_internal_context>`.
- Updates core goal steering and `ext/goal` steering to inject the new
internal-context fragment.
- Updates contextual-fragment, event-mapping, goal, and session tests
for the new wrapper.

## Test Coverage

- Adds coverage for detecting the new internal model context fragment.
- Preserves coverage for hiding legacy `<goal_context>` fragments.
- Verifies invalid internal context sources are rejected and arbitrary
context tags are not hidden.
- Updates goal steering/session assertions to expect the new
`source="goal"` wrapper.
2026-05-29 10:28:25 +02:00
Ahmed Ibrahim
79de1ac6f7 codex: preserve model switch in selector integration test 2026-05-29 01:23:24 -07:00
Ahmed Ibrahim
1657ac2983 codex: refresh remote model fixture in selector integration test 2026-05-29 01:10:58 -07:00
Ahmed Ibrahim
b030e34870 codex: fix CI failure on PR #25031 2026-05-29 00:57:20 -07:00
Ahmed Ibrahim
dbf5762796 [codex] Expose selector integration response body 2026-05-29 00:48:07 -07:00
Ahmed Ibrahim
ad9ab6eb34 [codex] Add tool mode selector integration coverage 2026-05-29 00:46:37 -07:00
Ahmed Ibrahim
c1713608ac [codex] Inline tool mode resolution 2026-05-29 00:40:33 -07:00
Ahmed Ibrahim
b138a8a992 [codex] Use ToolMode as resolved runtime value 2026-05-29 00:18:53 -07:00
Ahmed Ibrahim
7c264fbbd2 [codex] Keep tool mode runtime state out of config 2026-05-29 00:07:40 -07:00