Commit Graph
4544 Commits
Author SHA1 Message Date
Michael Bolin 8ed35bd38d Merge b9abfde313 into sapling-pr-archive-bolinfest 2025-10-27 00:14:06 -07:00
Michael Bolin b9abfde313 feat: introduce GetConversationSummary RPC 2025-10-27 00:13:25 -07:00
Michael Bolin 7635b61210 merge commit for archive created by Sapling 2025-10-26 23:03:36 -07:00
Michael Bolin c3a93cbe46 feat: update NewConversationParams to take an optional model_provider 2025-10-26 23:03:26 -07:00
Michael Bolin f9183c9cea feat: annotate conversations with model_provider for filtering 2025-10-26 23:03:26 -07:00
Michael Bolin 64d11e1de4 merge commit for archive created by Sapling 2025-10-26 22:13:21 -07:00
Michael Bolin 24d9adc527 feat: update NewConversationParams to take an optional model_provider 2025-10-26 21:59:44 -07:00
Michael Bolin b54cb224f1 feat: annotate conversations with model_provider for filtering 2025-10-26 21:59:44 -07:00
Michael Bolin e56dd0852f Merge 735540b6a9 into sapling-pr-archive-bolinfest 2025-10-26 20:25:49 -07:00
Michael Bolin 735540b6a9 feat: update NewConversationParams to take an optional model_provider 2025-10-26 20:25:43 -07:00
Michael Bolin 53a7afcd79 Merge 5aa9383012 into sapling-pr-archive-bolinfest 2025-10-26 18:58:20 -07:00
Michael Bolin 1fae499fd5 feat: annotate conversations with model_provider for filtering 2025-10-26 18:57:57 -07:00
Michael Bolin 5aa9383012 feat: update NewConversationParams to take an optional model_provider 2025-10-26 18:57:57 -07:00
Michael Bolin a55b0c4bcc fix: revert "[app-server] fix account/read response annotation (#5642)" (#5796)
Revert #5642 because this generates:

```
// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type GetAccountResponse = Account | null;
```

But `Account` is unknown.

The unique use of `#[ts(export)]` on `GetAccountResponse` is also
suspicious as are the changes to
`codex-rs/app-server-protocol/src/export.rs` since the existing system
has worked fine for quite some time.

Though a pure backout of #5642 puts things in a state where, as the PR
noted, the following does not work:

```
cargo run -p codex-app-server-protocol --bin export -- --out DIR
```

So in addition to the backout, this PR adds:

```rust
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
pub struct GetAccountResponse {
    pub account: Account,
}
```

and changes `GetAccount.response` as follows:

```diff
-        response: Option<Account>,
+        response: GetAccountResponse,
```

making it consistent with other types.

With this change, I verified that both of the following work:

```
just codex generate-ts --out /tmp/somewhere
cargo run -p codex-app-server-protocol --bin export -- --out /tmp/somewhere-else
```

The generated TypeScript is as follows:

```typescript
// GetAccountResponse.ts
import type { Account } from "./Account";

export type GetAccountResponse = { account: Account, };
```

and

```typescript
// Account.ts
import type { PlanType } from "./PlanType";

export type Account = { "type": "ApiKey", api_key: string, } | { "type": "chatgpt", email: string | null, plan_type: PlanType, };
```

Though while the inconsistency between `"type": "ApiKey"` and `"type":
"chatgpt"` is quite concerning, I'm not sure if that format is ever
written to disk in any case, but @owenlin0, I would recommend looking
into that.

Also, it appears that the types in `codex-rs/protocol/src/account.rs`
are used exclusively by the `app-server-protocol` crate, so perhaps they
should just be moved there?
2025-10-26 18:57:42 -07:00
Thibault Sottiaux 224222f09f fix: use codex-exp prefix for experimental models and consider codex- models to be production (#5797) 2025-10-27 01:55:12 +00:00
Michael Bolin fd90ca9be6 Merge 220eba713b into sapling-pr-archive-bolinfest 2025-10-26 18:41:11 -07:00
Michael Bolin 220eba713b Back out "[app-server] fix account/read response annotation (#5642)"
Original commit changeset: 190e7eb104
2025-10-26 18:41:06 -07:00
Michael Bolin 08bfac5ee4 Merge 67a0e64866 into sapling-pr-archive-bolinfest 2025-10-26 18:26:42 -07:00
Michael Bolin 67a0e64866 Back out "[app-server] fix account/read response annotation (#5642)"
Original commit changeset: 190e7eb104
2025-10-26 18:23:25 -07:00
Michael Bolin 327fdc1f66 Merge 1cfea37a53 into sapling-pr-archive-bolinfest 2025-10-26 16:46:02 -07:00
Michael Bolin 1cfea37a53 feat: update NewConversationParams to take an optional model_provider 2025-10-26 16:45:52 -07:00
Michael Bolin 3d9c27bc94 merge commit for archive created by Sapling 2025-10-26 16:13:49 -07:00
Michael Bolin 2bca20a3aa feat: annotate conversations with model_provider for filtering 2025-10-26 16:13:43 -07:00
Michael Bolin 8dd1899a88 merge commit for archive created by Sapling 2025-10-26 15:31:28 -07:00
Michael Bolin 299f2d33d0 feat: annotate conversations with model_provider for filtering 2025-10-26 15:20:48 -07:00
Michael Bolin 396101811d merge commit for archive created by Sapling 2025-10-26 13:59:14 -07:00
Michael Bolin 89b7b4a187 feat: annotate conversations with model_provider for filtering 2025-10-26 13:59:07 -07:00
Gabriel Peal 7aab45e060 [MCP] Minor docs clarifications around stdio tokens (#5676)
Noticed
[here](https://github.com/openai/codex/issues/4707#issuecomment-3446547561)
2025-10-26 13:38:30 -04:00
Eric Traut bcd64c7e72 Reduced runtime of unit test that was taking multiple minutes (#5688)
Modified `build_compacted_history_truncates_overlong_user_messages` test
to reduce runtime from minutes to tens of seconds
2025-10-25 23:46:08 -07:00
Michael Bolin 40ed0ab146 merge commit for archive created by Sapling 2025-10-25 23:42:29 -07:00
Michael Bolin 85cd533121 feat: annotate conversations with model_provider for filtering 2025-10-25 23:42:23 -07:00
Eric Traut c124f24354 Added support for sandbox_mode in profiles (#5686)
Currently, `approval_policy` is supported in profiles, but
`sandbox_mode` is not. This PR adds support for `sandbox_mode`.

Note: a fix for this was submitted in [this
PR](https://github.com/openai/codex/pull/2397), but the underlying code
has changed significantly since then.

This addresses issue #3034
2025-10-25 16:52:26 -07:00
pakrym-oai c7e4e6d0ee Skip flaky test (#5680)
Did an investigation but couldn't find anything obvious. Let's skip for
now.
2025-10-25 12:11:16 -07:00
Michael Bolin 1a340c433b merge commit for archive created by Sapling 2025-10-25 08:56:52 -07:00
Michael Bolin 88bc431b31 feat: annotate conversations with model_provider for filtering 2025-10-25 08:56:43 -07:00
Ahmed Ibrahim 88abbf58ce Followup feedback (#5663)
- Added files to be uploaded
- Refactored
- Updated title
2025-10-25 06:07:40 +00:00
Ahmed Ibrahim 71f838389b Improve feedback (#5661)
<img width="1099" height="153" alt="image"
src="https://github.com/user-attachments/assets/2c901884-8baf-4b1b-b2c4-bcb61ff42be8"
/>

<img width="1082" height="125" alt="image"
src="https://github.com/user-attachments/assets/6336e6c9-9ace-46df-a383-a807ceffa524"
/>

<img width="1102" height="103" alt="image"
src="https://github.com/user-attachments/assets/78883682-7e44-4fa3-9e04-57f7df4766fd"
/>
2025-10-24 22:28:14 -07:00
Michael Bolin f3262af052 Merge f42951233a into sapling-pr-archive-bolinfest 2025-10-24 16:55:15 -07:00
Michael Bolin f42951233a feat: annotate conversations with model_provider for filtering 2025-10-24 16:55:10 -07:00
Eric Traut 0533bd2e7c Fixed flaky unit test (#5654)
This PR fixes a test that is sporadically failing in CI.

The problem is that two unit tests (the older `login_and_cancel_chatgpt`
and a recently added
`login_chatgpt_includes_forced_workspace_query_param`) exercise code
paths that start the login server. The server binds to a hard-coded
localhost port number, so attempts to start more than one server at the
same time will fail. If these two tests happen to run concurrently, one
of them will fail.

To fix this, I've added a simple mutex. We can use this same mutex for
future tests that use the same pattern.
2025-10-24 16:31:24 -07:00
Michael Bolin 1d425e40c4 Merge 4a62376e6b into sapling-pr-archive-bolinfest 2025-10-24 16:12:50 -07:00
Michael Bolin 4a62376e6b fix: attempting to resume an existing conversation in ConversationManager should reuse it 2025-10-24 16:12:43 -07:00
Michael Bolin 8922579c96 Merge a3638fd3e3 into sapling-pr-archive-bolinfest 2025-10-24 16:00:52 -07:00
Michael Bolin a3638fd3e3 feat: annotate conversations with model_provider for filtering 2025-10-24 16:00:44 -07:00
Michael Bolin cc2d11afaf merge commit for archive created by Sapling 2025-10-24 15:54:07 -07:00
Michael Bolin d1e06576e1 fix: attempting to resume an existing conversation in ConversationManager should reuse it 2025-10-24 15:53:56 -07:00
Anton Panasenko 6af83d86ff [codex][app-server] introduce codex/event/raw_item events (#5578) 2025-10-24 22:41:52 +00:00
Gabriel Peal e2e1b65da6 [MCP] Properly gate login after mcp add with experimental_use_rmcp_client (#5653)
There was supposed to be a check here like in other places.
2025-10-24 18:32:15 -04:00
Gabriel Peal 817d1508bc [MCP] Redact environment variable values in /mcp and mcp get (#5648)
Fixes #5524
2025-10-24 18:30:20 -04:00
Eric Traut f8af4f5c8d Added model summary and risk assessment for commands that violate sandbox policy (#5536)
This PR adds support for a model-based summary and risk assessment for
commands that violate the sandbox policy and require user approval. This
aids the user in evaluating whether the command should be approved.

The feature works by taking a failed command and passing it back to the
model and asking it to summarize the command, give it a risk level (low,
medium, high) and a risk category (e.g. "data deletion" or "data
exfiltration"). It uses a new conversation thread so the context in the
existing thread doesn't influence the answer. If the call to the model
fails or takes longer than 5 seconds, it falls back to the current
behavior.

For now, this is an experimental feature and is gated by a config key
`experimental_sandbox_command_assessment`.

Here is a screen shot of the approval prompt showing the risk assessment
and summary.

<img width="723" height="282" alt="image"
src="https://github.com/user-attachments/assets/4597dd7c-d5a0-4e9f-9d13-414bd082fd6b"
/>
2025-10-24 15:23:44 -07:00