Commit Graph

4563 Commits

Author SHA1 Message Date
Charles Cunningham
cf4ceb239a Relax flaky spawn-agent status assertion
Allow the child agent state to be either PendingInit or Running when the spawn completion notification arrives.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 14:19:46 -07:00
Charles Cunningham
55b9ad1490 Preserve empty user turns during contextual stripping
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 13:43:16 -07:00
Charles Cunningham
85deecbd58 Preserve ephemeral context when steering active turns
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 13:39:55 -07:00
Charles Cunningham
bbb827666f Align ephemeral context with fragment conventions
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 12:22:26 -07:00
Charles Cunningham
cc2e3e4996 Finish rebase cleanup
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 12:08:19 -07:00
Charles Cunningham
766be572d4 Clarify ephemeral context compaction docs
Document that the current turn's ephemeral context is preserved across mid-turn compaction, while older ephemeral context is stripped during compaction.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:41:46 -07:00
Charles Cunningham
1f56845cc4 Fix exec TurnStartParams initializer
Add the new ephemeral_context field to codex-exec's turn/start request so the crate compiles against the updated app-server protocol.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:41:39 -07:00
Charles Cunningham
72d53a2c9b Add ephemeral turn context support
Introduce app-server ephemeralContext, render it as additional_context_for_this_turn fragments, and strip it correctly across contextual-user diffing and compaction flows.

Regenerate app-server schema fixtures and add coverage for model-visible layout, compaction, oversize validation, and resumed/forked context reconstruction.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:41:35 -07:00
Charles Cunningham
4bcfdafd01 Fix post-rebase test fallout
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:30:45 -07:00
Charles Cunningham
fe982f5fb6 Gate additional-permission guidance on exec approvals only
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:25:15 -07:00
Charles Cunningham
43fb746077 Restore image output dir helper after rebase
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:10:17 -07:00
Charles Cunningham
34e707738f Update tests for split contextual-user fragments
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:02:37 -07:00
Charles Cunningham
93e16c39cc Emit AGENTS reset when project docs disappear
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:02:37 -07:00
Charles Cunningham
28bf5ab632 Fix core tests after context fragment split
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:02:37 -07:00
Charles Cunningham
0961e40158 Backfill project doc instructions in tui tests
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:02:11 -07:00
Charles Cunningham
c62ecd4e17 Emit collaboration updates for legacy baselines
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:02:11 -07:00
Charles Cunningham
0a8e3f62d3 Backfill project doc instructions in state tests
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:49 -07:00
Charles Cunningham
105c20a522 Split aggregated user instructions into contextual fragments
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:49 -07:00
Charles Cunningham
73ee483833 Revert client test churn
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:49 -07:00
Charles Cunningham
0be022063b Tighten model-visible context guide
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:48 -07:00
Charles Cunningham
f29fa0abe0 Remove DeveloperInstructions alias
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:48 -07:00
Charles Cunningham
38de034847 Drop lockfile drift
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
24bc139c89 Refresh model-visible context docs
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
56f5f6346a Relax AGENTS wrapper assertions in client tests
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
217eeaee9c Disambiguate snapshot cwd placeholders
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
85880b4495 Document model-visible fragment rules
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
5edd095068 Standardize model-visible fragment registration
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
54260252db Preserve custom realtime start instructions
Restore the configured experimental realtime start instructions when realtime activates, while keeping the default helper for the normal path.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:30 -07:00
Charles Cunningham
f17ae06ae3 Mention legacy exec permission flow in prompt guidance
Include with_additional_permissions guidance when either exec permission approvals or the request-permissions tool path is enabled, and add a permissions-message regression test for the legacy exec approvals flow.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:13 -07:00
Charles Cunningham
fc3caab095 Remove expect from contextual fragment wrapper
Replace the expect call in ContextualUserFragment::wrap_contextual_user_body with an explicit pattern match so the code stays compatible with the repo's clippy policy.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:13 -07:00
Charles Cunningham
877d86ac78 Fix post-rebase merge fallout
Clean up leftover conflict markers and restore the current sandbox-permissions helper calls after rebasing context fragment work onto origin/main.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:13 -07:00
Charles Cunningham
0e77d775e0 Simplify contextual fragment registry imports
Import the registered contextual-user fragment types at the top of model_visible_context.rs so the registry reads directly without repeated inline crate paths.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:13 -07:00
Charles Cunningham
fff5f28ce1 Unify contextual user fragment detection
Collapse the contextual-user detection APIs into a single ContextualUserFragment trait with default marker-based matching and wrapping. Update the fragment docs and registry naming to match the new blessed path, and fix the stale arc monitor test reference exposed by the refactor.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:13 -07:00
Charles Cunningham
4f554b902a Clarify contextual user fragment registry docs
Document the contextual user registry with the same level of guidance as the developer registry, including detection-only fragments versus turn-state diff fragments.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
Charles Cunningham
6b40e2a99d Drop stray lockfile drift
Restore Cargo.lock to origin/main so this PR does not carry an unrelated dependency lockfile delta.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
Charles Cunningham
9874d961ff Tighten context fragment PR diff
Restore extracted core test modules instead of carrying inline test churn in production files. This keeps the actual fragment changes intact while dropping unrelated restack noise.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
Charles Cunningham
560d66b430 Drop arc monitor test churn from context fragment PR
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
Charles Cunningham
a000166a4d Drop permission policy changes from context fragment PR
Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
Charles Cunningham
3954e00f53 Restack context fragment standardization
Reapply the standardized model-visible context fragment work on top of the latest origin/main as a clean squashed restack.

Co-authored-by: Codex <noreply@openai.com>
2026-03-13 11:01:12 -07:00
sayan-oai
9f2da5a9ce chore: clarify plugin + app copy in model instructions (#14541)
- clarify app mentions are in user messages
- clarify what it means for tools to be provided via `codex_apps` MCP
- add plugin descriptions (with basic sanitization) to top-level `##
Plugins` section alongside the corresponding plugin names
- explain that skills from plugins are prefixed with `plugin_name:` in
top-level `##Plugins` section

changes to more logically organize `Apps`, `Skills`, and `Plugins`
instructions will be in a separate PR, as that shuffles dev + user
instructions in ways that change tests broadly.

### Tests
confirmed in local rollout, some new tests.
2026-03-13 10:57:41 -07:00
Jack Mousseau
59b588b8ec Improve granular approval policy prompt (#14553) 2026-03-13 10:42:17 -07:00
Won Park
958f93f899 sending back imagaegencall response back to responseapi (#14558)
Sending back the ResponseItem::ImageGenerationCall as is, because it is
now supported from the API-side.
2026-03-13 17:29:19 +00:00
iceweasel-oai
6b3d82daca Use a private desktop for Windows sandbox instead of Winsta0\Default (#14400)
## Summary
- launch Windows sandboxed children on a private desktop instead of
`Winsta0\Default`
- make private desktop the default while keeping
`windows.sandbox_private_desktop=false` as the escape hatch
- centralize process launch through the shared
`create_process_as_user(...)` path
- scope the private desktop ACL to the launching logon SID

## Why
Today sandboxed Windows commands run on the visible shared desktop. That
leaves an avoidable same-desktop attack surface for window interaction,
spoofing, and related UI/input issues. This change moves sandboxed
commands onto a dedicated per-launch desktop by default so the sandbox
no longer shares `Winsta0\Default` with the user session.

The implementation stays conservative on security with no silent
fallback back to `Winsta0\Default`

If private-desktop setup fails on a machine, users can still opt out
explicitly with `windows.sandbox_private_desktop=false`.

## Validation
- `cargo build -p codex-cli`
- elevated-path `codex exec` desktop-name probe returned
`CodexSandboxDesktop-*`
- elevated-path `codex exec` smoke sweep for shell commands, nested
`pwsh`, jobs, and hidden `notepad` launch
- unelevated-path full private-desktop compatibility sweep via `codex
exec` with `-c windows.sandbox=unelevated`
2026-03-13 10:13:39 -07:00
pakrym-oai
9c9867c9fa code mode: single line tool declarations (#14526)
## Summary
- render code mode tool declarations as single-line TypeScript snippets
- make the JSON schema renderer emit inline object shapes for these
declarations
- update code mode/spec expectations to match the new inline rendering

## Testing
- `just fmt`
- `cargo test -p codex-core render_json_schema_to_typescript`
- `cargo test -p codex-core code_mode_augments_`
- `cargo test -p codex-core --test all exports_all_tools_metadata --
--nocapture`
2026-03-13 10:08:34 -07:00
pakrym-oai
8e89e9eded Split multi-agent handler into dedicated files (#14603)
## Summary
- move the multi-agent handlers suite into its own files for spawn,
wait, resume, send input, and close logic
- keep the aggregated module in place while delegating each handler to
its new file to keep things organized per handler

## Testing
- Not run (not requested)
2026-03-13 09:11:03 -07:00
Ahmed Ibrahim
c7e847aaeb Add diagnostics for read_only_unless_trusted timeout flake (#14518)
## Summary
- add targeted diagnostic logging for the
read_only_unless_trusted_requires_approval scenarios in
approval_matrix_covers_all_modes
- add a scoped timeout buffer only for ro_unless_trusted write-file
scenarios: 1000ms -> 2000ms
- keep all other write-file scenarios at 1000ms

## Why
The last two main failures were both in codex-core::all
suite::approvals::approval_matrix_covers_all_modes with exit_code=124 in
the same scenario. This points to execution-time jitter in CI rather
than a semantic approval-policy mismatch.

## Notes
- This does not introduce any >5s timeout and does not
disable/quarantine tests.
- The timeout increase is tightly scoped to the single flaky path and
keeps the matrix deterministic under CI scheduling variance.
2026-03-12 23:51:03 -07:00
Ahmed Ibrahim
2253a9d1d7 Add realtime transcription mode for websocket sessions (#14556)
- add experimental_realtime_ws_mode (conversational/transcription) and
plumb it into realtime conversation session config
- switch realtime websocket intent and session.update payload shape
based on mode
- update config schema and realtime/config tests

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-12 23:50:30 -07:00
Ahmed Ibrahim
eaf81d3f6f Add codex tool support for realtime v2 handoff (#14554)
- Advertise a `codex` function tool in realtime v2 session updates.
- Emit handoff replies as `function_call_output` items while keeping v1
behavior unchanged.
- Split realtime event parsing into explicit v1/v2 modules with shared
common helpers.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-12 23:30:02 -07:00
Celia Chen
0c60eea4a5 feat: support skill-scoped managed network domain overrides in skill config (#14522)
## Summary

This lets skill loading split `permissions.network` into two distinct
pieces:

- `permissions.network.enabled` still feeds the skill
`PermissionProfile` and remains the coarse gate for whether the skill
can use network access at all.
- `permissions.network.allowed_domains` and
`permissions.network.denied_domains` are lifted into a new
`SkillManagedNetworkOverride` so managed-network sessions can start
per-skill scoped proxies with the right domain overrides.

The change also updates `SkillMetadata` construction sites and adds
loader tests covering YAML parsing plus normalization of the network
gate vs. domain override fields.

## Follow-up
A PR that uses the network_override to spin up a skill-specific proxy if
network_override is not none.
2026-03-13 04:45:14 +00:00
Jack Mousseau
7c7e267501 Simplify permissions available in request permissions tool (#14529) 2026-03-12 21:13:17 -07:00