Commit Graph

8506 Commits

Author SHA1 Message Date
Michael Bolin
46963e49d8 Merge d6ab70b8bf into sapling-pr-archive-bolinfest 2026-02-25 16:39:36 -08:00
Michael Bolin
d6ab70b8bf feat: include available decisions in command approval requests 2026-02-25 16:39:29 -08:00
Michael Bolin
d6d820006b Merge d584cd18c4 into sapling-pr-archive-bolinfest 2026-02-25 16:14:29 -08:00
Michael Bolin
d584cd18c4 feat: include available decisions in command approval requests 2026-02-25 16:14:25 -08:00
Michael Bolin
e0c31b06eb merge commit for archive created by Sapling 2026-02-25 16:12:48 -08:00
Michael Bolin
95e3f794e8 feat: include available decisions in command approval requests 2026-02-25 16:12:34 -08:00
Michael Bolin
90b935d3ac Merge 43b6e27c30 into sapling-pr-archive-bolinfest 2026-02-25 16:12:15 -08:00
Michael Bolin
43b6e27c30 feat: include sandbox config with escalation request 2026-02-25 16:11:46 -08:00
Ahmed Ibrahim
e76b1a2853 Remove steer feature flag (#12026)
All code should go in the direction that steer is enabled

---------

Co-authored-by: Codex <noreply@openai.com>
2026-02-25 15:41:42 -08:00
Michael Bolin
a6a5976c5a feat: scope execve session approvals by approved skill metadata (#12814)
Previous to this change, `determine_action()` would

1. check if `program` is associated with a skill
2. if so, check if `program` is in `execve_session_approvals` to see
whether the user needs to be prompted

This PR flips the order of these checks to try to set us up so that
"session approvals" are always consulted first (which should soon extend
to include session approvals derived from `prefix_rule()`s, as well).

Though to make the new ordering work, we need to record any relevant
metadata to associate with the approval, which in the case of a
skill-based approval is the `SkillMetadata` so that we can derive the
`PermissionProfile` to include with the escalation. (Though as noted by
the `TODO`, this `PermissionProfile` is not honored yet.)

The new `ExecveSessionApproval` struct is used to retain the necessary
metadata.

## What Changed

- Replace the `execve_session_approvals` `HashSet` with a map that
stores an `ExecveSessionApproval` alongside each approved `program`.
- When a user chooses `ApprovedForSession` for a skill script, capture
the matched `SkillMetadata` in the session approval entry.
- Consult that cache before re-running `find_skill()`, and reuse the
originally approved skill metadata and permission profile when allowing
later execve callbacks in the same session.
2026-02-25 15:30:24 -08:00
Michael Bolin
ce82db9fb2 merge commit for archive created by Sapling 2026-02-25 15:24:54 -08:00
Michael Bolin
de00e932dd feat: include available decisions in command approval requests 2026-02-25 15:24:44 -08:00
Charley Cunningham
2f4d6ded1d Enable request_user_input in Default mode (#12735)
## Summary
- allow `request_user_input` in Default collaboration mode as well as
Plan
- update the Default-mode instructions to prefer assumptions first and
use `request_user_input` only when a question is unavoidable
- update request_user_input and app-server tests to match the new
Default-mode behavior
- refactor collaboration-mode availability plumbing into
`CollaborationModesConfig` for future mode-related flags

## Codex author
`codex resume 019c9124-ed28-7c13-96c6-b916b1c97d49`
2026-02-25 15:20:46 -08:00
Michael Bolin
f94b394f15 Merge 30aee22fa7 into sapling-pr-archive-bolinfest 2026-02-25 15:07:48 -08:00
Michael Bolin
30aee22fa7 feat: scope execve session approvals by approved skill metadata 2026-02-25 15:07:43 -08:00
Michael Bolin
cbee448ac4 merge commit for archive created by Sapling 2026-02-25 15:01:03 -08:00
Michael Bolin
56de2a411b feat: include available decisions in command approval requests 2026-02-25 15:00:54 -08:00
Ahmed Ibrahim
2bd87d1a75 only use preambles for realtime (#12831)
Reverts openai/codex#12830
2026-02-25 14:54:54 -08:00
Michael Bolin
c88bdad675 Merge 0aa942c125 into sapling-pr-archive-bolinfest 2026-02-25 14:52:34 -08:00
Michael Bolin
0aa942c125 feat: include available decisions in command approval requests 2026-02-25 14:52:29 -08:00
Michael Bolin
e4d21de6cb merge commit for archive created by Sapling 2026-02-25 14:51:52 -08:00
Michael Bolin
b9887e2c0d feat: include available decisions in command approval requests 2026-02-25 14:51:46 -08:00
Michael Bolin
c1ca7aad24 merge commit for archive created by Sapling 2026-02-25 14:51:09 -08:00
Michael Bolin
a6e83ef28e feat: include available decisions in command approval requests 2026-02-25 14:50:51 -08:00
Celia Chen
b6d20748e0 Revert "Ensure shell command skills trigger approval (#12697)" (#12721)
This reverts commit daf0f03ac8.

# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2026-02-25 22:49:53 +00:00
Michael Bolin
2569ac2006 Merge 9f008e0faa into sapling-pr-archive-bolinfest 2026-02-25 14:40:55 -08:00
Michael Bolin
9f008e0faa feat: scope execve session approvals by approved skill metadata 2026-02-25 14:40:32 -08:00
Ahmed Ibrahim
f86087eaa8 Revert "only use preambles for realtime" (#12830)
Reverts openai/codex#12806
2026-02-25 14:30:48 -08:00
Michael Bolin
ad130d641b merge commit for archive created by Sapling 2026-02-25 14:29:03 -08:00
Michael Bolin
73224678bf feat: scope execve session approvals by approved skill metadata 2026-02-25 14:28:19 -08:00
Michael Bolin
7707752ae1 feat: include available decisions in command approval requests 2026-02-25 14:28:19 -08:00
Ahmed Ibrahim
c1851be1ed only use preambles for realtime (#12806)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-02-25 13:41:54 -08:00
Michael Bolin
a8ae76a5ae merge commit for archive created by Sapling 2026-02-25 13:33:25 -08:00
Michael Bolin
43daba8cb6 feat: scope execve session approvals by approved skill metadata 2026-02-25 13:33:16 -08:00
Owen Lin
21f7032dbb feat(app-server): thread/unsubscribe API (#10954)
Adds a new v2 app-server API for a client to be able to unsubscribe to a
thread:
- New RPC method: `thread/unsubscribe`
- New server notification: `thread/closed`

Today clients can start/resume/archive threads, but there wasn’t a way
to explicitly unload a live thread from memory without archiving it.
With `thread/unsubscribe`, a client can indicate it is no longer
actively working with a live Thread. If this is the only client
subscribed to that given thread, the thread will be automatically closed
by app-server, at which point the server will send `thread/closed` and
`thread/status/changed` with `status: notLoaded` notifications.

This gives clients a way to prevent long-running app-server processes
from accumulating too many thread (and related) objects in memory.

Closed threads will also be removed from `thread/loaded/list`.
2026-02-25 13:14:30 -08:00
Michael Bolin
1acbef8d92 merge commit for archive created by Sapling 2026-02-25 13:11:49 -08:00
Michael Bolin
ddf331f618 feat: scope execve session approvals by approved skill metadata 2026-02-25 13:11:38 -08:00
Michael Bolin
e87fabb967 Merge 4eaec7be7d into sapling-pr-archive-bolinfest 2026-02-25 13:02:32 -08:00
Michael Bolin
2383104d3f feat: include available decisions in command approval requests 2026-02-25 13:02:23 -08:00
Michael Bolin
4eaec7be7d feat: scope execve session approvals by approved skill metadata 2026-02-25 13:02:23 -08:00
sayan-oai
d45ffd5830 make 5.3-codex visible in cli for api users (#12808)
5.3-codex released in api, mark it visible for API users via bundled
`models.json`.
2026-02-25 13:01:40 -08:00
Michael Bolin
4cae7ce19c Merge a8d528affb into sapling-pr-archive-bolinfest 2026-02-25 12:37:47 -08:00
Michael Bolin
a8d528affb feat: scope execve session approvals by approved skill metadata 2026-02-25 12:37:28 -08:00
Michael Bolin
86b4ebc19e Merge 7d9c3547fe into sapling-pr-archive-bolinfest 2026-02-25 12:30:11 -08:00
Michael Bolin
f523c45e65 feat: include available decisions in command approval requests 2026-02-25 12:29:40 -08:00
Michael Bolin
7d9c3547fe feat: scope execve session approvals by approved skill metadata 2026-02-25 12:29:40 -08:00
Michael Bolin
be5bca6f8d fix: harden zsh fork tests and keep subcommand approvals deterministic (#12809)
## Why
The prior
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
assertion was brittle under Bazel: command approval payloads in the test
could include environment-dependent wrapper/command formatting
differences, which makes exact command-string matching flaky even when
behavior is correct.

(This regression was knowingly introduced in
https://github.com/openai/codex/pull/12800, but it was urgent to land
that PR.)

## What changed
- Hardened
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
in
[`turn_start_zsh_fork.rs`](https://github.com/openai/codex/blob/main/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs):
- Replaced strict `approval_command.starts_with("/bin/rm")` checks with
intent-based subcommand matching.
- Subcommand approvals are now recognized by file-target semantics
(`first.txt` or `second.txt`) plus `rm` intent.
- Parent approval recognition is now more tolerant of command-format
differences while still requiring a definitive parent command context.
- Uses a defensive loop that waits for all target subcommand decisions
and the parent approval request.
- Preserved the existing regression and unit test fixes from earlier
commits in `unix_escalation.rs` and `skill_approval.rs`.

## Verification
- Ran the zsh fork subcommand decline regression under this change:
-
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
- Confirmed the test is now robust against approval-command-string
variation instead of hardcoding one expected command shape.
2026-02-25 12:23:30 -08:00
Eric Traut
f6fdfbeb98 Update Codex docs success link (#12805)
Fix a stale documentation link in the sign-in flow
2026-02-25 12:02:41 -08:00
Ahmed Ibrahim
3f30746237 Add simple realtime text logs (#12807)
Update realtime debug logs to include the actual text payloads in both
input and output paths.

- In `core/src/realtime_conversation.rs`:
- `handle_start`: add extracted assistant text output to the
`[realtime-text]` debug log.
- `handle_text`: add incoming text input (`params.text`) to the
`[realtime-text]` debug log.

No tests were run (per request).
2026-02-25 12:01:48 -08:00
Owen Lin
a0fd94bde6 feat(app-server): add ThreadItem::DynamicToolCall (#12732)
Previously, clients would call `thread/start` with dynamic_tools set,
and when a model invokes a dynamic tool, it would just make the
server->client `item/tool/call` request and wait for the client's
response to complete the tool call. This works, but it doesn't have an
`item/started` or `item/completed` event.

Now we are doing this:
- [new] emit `item/started` with `DynamicToolCall` populated with the
call arguments
- send an `item/tool/call` server request
- [new] once the client responds, emit `item/completed` with
`DynamicToolCall` populated with the response.

Also, with `persistExtendedHistory: true`, dynamic tool calls are now
reconstructable in `thread/read` and `thread/resume` as
`ThreadItem::DynamicToolCall`.
2026-02-25 12:00:10 -08:00