Commit Graph
240 Commits
Author SHA1 Message Date
James Peter 4d3202b34b Refresh codex-rs mirror to upstream/main 2026-05-08 21:55:59 +10:00
James Peter 8a53319f61 Refresh codex-rs mirror to upstream/main 2026-05-01 20:50:29 +10:00
James Peter b5461c996f Refresh codex-rs mirror to upstream/main 2026-04-26 10:55:09 +10:00
James Peter b98a9bb169 chore(codex-rs): refresh mirror to upstream/main 2026-04-25 09:28:43 +10:00
James Peter b73b85a7c8 Refresh codex-rs mirror to upstream/main 2026-04-24 12:30:54 +10:00
James Peter 8ddde659e9 Refresh codex-rs mirror to upstream/main 2026-04-22 10:37:56 +10:00
James Peter 22a862d19e Refresh codex-rs mirror to upstream/main 2026-04-17 09:27:53 +10:00
James Peter 584a3e64fb Refresh codex-rs mirror to upstream/main 2026-04-08 11:04:24 +10:00
James Peter ee9bfbcb94 Refresh codex-rs mirror to upstream/main 2026-04-05 14:44:00 +10:00
James Peter dee3dd2339 Refresh codex-rs mirror to upstream/main 2026-04-03 10:43:20 +10:00
James Peter 2b94219f78 Refresh codex-rs mirror to upstream/main 2026-03-31 07:30:59 +10:00
James Peter d935e51f24 Refresh codex-rs mirror to upstream/main 2026-03-25 08:05:43 +10:00
James Peter e407758a38 chore(codex-rs): refresh mirror to upstream/main 2026-03-24 12:30:03 +10:00
James Peter 39261e6a9b chore(codex-rs): refresh mirror to upstream/main 2026-03-23 12:38:02 +10:00
James Peter 6c8223f440 Refresh codex-rs mirror to upstream/main 2026-03-12 22:17:34 +10:00
James Peter 30b7fd17b0 chore(codex-rs): refresh mirror to upstream main 2026-03-11 08:04:36 +10:00
James Peter 1f14237291 Refresh codex-rs mirror to upstream/main 2026-03-10 09:11:28 +10:00
James Peter 2f99f6bf1d Refresh codex-rs mirror to upstream/main 2026-03-08 16:54:01 +10:00
James Peter a9af53d771 Refresh codex-rs mirror to upstream/main 2026-03-06 06:21:19 +10:00
James Peter de66074777 chore(codex-rs): refresh mirror to upstream/main 2026-02-28 21:58:28 +10:00
James Peter 7a3ef9a97e Refresh codex-rs mirror to upstream/main 2026-02-27 02:48:37 +10:00
James Peter 71e0c242c4 Refresh codex-rs mirror to upstream/main 2026-02-21 11:34:27 +10:00
James Peter 65fd3cd4af Refresh codex-rs mirror to upstream/main 2026-02-15 14:24:00 +10:00
James Peter cb8fc2fae6 Refresh codex-rs mirror to upstream/main 2026-02-13 13:37:43 +10:00
James Peter 89c3ea5b51 chore(codex-rs): refresh mirror to upstream/main 2026-02-13 06:20:20 +10:00
James Peter 3b7889473b Refresh codex-rs mirror to upstream/main 2026-02-12 04:43:55 +10:00
James Peter eec4152f09 Refresh codex-rs mirror to upstream/main 2026-02-11 14:23:52 +10:00
James Peter 28471c826c Refresh codex-rs mirror to upstream/main 2026-02-10 18:57:51 +10:00
Auto Review 0cc85ab490 Refresh codex-rs mirror to upstream/main 2026-02-06 07:09:39 +10:00
James Peter e805caad12 Refresh codex-rs mirror to upstream/main 2026-02-01 22:42:49 +10:00
James Peter 38e1f22ea5 Refresh codex-rs mirror to upstream/main 2026-01-30 15:21:20 +10:00
James Peter 3f307f1d87 Refresh codex-rs mirror to upstream/main 2026-01-27 08:38:43 +10:00
James Peter 1ac487bebe Refresh codex-rs mirror to upstream/main 2026-01-22 08:56:06 +10:00
James Peter e1220eb5c5 Refresh codex-rs mirror to upstream/main 2026-01-17 10:21:37 +10:00
James Peter 7604732bae Refresh codex-rs mirror to upstream/main 2026-01-12 08:36:19 +10:00
James Peter 4ad2f50be3 Refresh codex-rs mirror to upstream/main 2026-01-06 16:52:24 +10:00
James Peter d12616b4f4 Refresh codex-rs mirror to upstream/main 2025-12-28 07:26:17 +10:00
James Peter 9334dc7ca5 Refresh codex-rs mirror to upstream/main 2025-12-20 17:03:19 +10:00
James Peter 294a31a57f Refresh codex-rs mirror to upstream/main 2025-12-19 04:36:12 +10:00
James Peter 6f7506c474 Refresh codex-rs mirror to upstream/main 2025-12-15 06:53:49 +10:00
James Peter f3bdb14c2d Refresh codex-rs mirror to upstream/main 2025-12-11 12:17:57 +10:00
James Peter aafb3b059b Refresh codex-rs mirror to upstream/main 2025-12-10 07:42:54 +10:00
James Peter 6682ba9aad Refresh codex-rs mirror to upstream/main 2025-11-26 13:52:26 +10:00
Celia ChenandGitHub f16e07c554 Revert "[core] add optional status_code to error events (#6865)" (#6955)
This reverts commit b13cf7df49.

# 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.
2025-11-20 01:26:14 +00:00
Celia ChenandGitHub b13cf7df49 [core] add optional status_code to error events (#6865)
We want to better uncover error status code for clients. Add an optional
status_code to error events (thread error, error, stream error) so app
server could uncover the status code from the client side later.

in event log:
```
< {
<   "method": "codex/event/stream_error",
<   "params": {
<     "conversationId": "019a9a32-f576-7292-9711-8e57e8063536",
<     "id": "0",
<     "msg": {
<       "message": "Reconnecting... 5/5",
<       "status_code": 401,
<       "type": "stream_error"
<     }
<   }
< }
< {
<   "method": "codex/event/error",
<   "params": {
<     "conversationId": "019a9a32-f576-7292-9711-8e57e8063536",
<     "id": "0",
<     "msg": {
<       "message": "exceeded retry limit, last status: 401 Unauthorized, request id: 9a0cb03a485067f7-SJC",
<       "status_code": 401,
<       "type": "error"
<     }
<   }
< }
```
2025-11-19 19:51:21 +00:00
Michael BolinandGitHub 52581f2113 fix: add more fields to ThreadStartResponse and ThreadResumeResponse (#6847)
This adds the following fields to `ThreadStartResponse` and
`ThreadResumeResponse`:

```rust
    pub model: String,
    pub model_provider: String,
    pub cwd: PathBuf,
    pub approval_policy: AskForApproval,
    pub sandbox: SandboxPolicy,
    pub reasoning_effort: Option<ReasoningEffort>,
```

This is important because these fields are optional in
`ThreadStartParams` and `ThreadResumeParams`, so the caller needs to be
able to determine what values were ultimately used to start/resume the
conversation. (Though note that any of these could be changed later
between turns in the conversation.)

Though to get this information reliably, it must be read from the
internal `SessionConfiguredEvent` that is created in response to the
start of a conversation. Because `SessionConfiguredEvent` (as defined in
`codex-rs/protocol/src/protocol.rs`) did not have all of these fields, a
number of them had to be added as part of this PR.

Because `SessionConfiguredEvent` is referenced in many tests, test
instances of `SessionConfiguredEvent` had to be updated, as well, which
is why this PR touches so many files.
2025-11-18 21:18:43 -08:00
Ahmed IbrahimandGitHub fd42430d6a Update defaults to gpt-5.1 (#6652)
## Summary
- update documentation, example configs, and automation defaults to
reference gpt-5.1 / gpt-5.1-codex
- bump the CLI and core configuration defaults, model presets, and error
messaging to the new models while keeping the model-family/tool coverage
for legacy slugs
- refresh tests, fixtures, and TUI snapshots so they expect the upgraded
defaults

## Testing
- `cargo test -p codex-core
config::tests::test_precedence_fixture_with_gpt5_profile`


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_i_6916c5b3c2b08321ace04ee38604fc6b)
2025-11-17 17:40:11 -08:00
Owen LinandGitHub 677edb324b [app-server] feat: add v2 command execution approval flow (#6758)
This PR adds the API V2 version of the command‑execution approval flow
for the shell tool.

This PR wires the new RPC (`item/commandExecution/requestApproval`, V2
only) and related events (`item/started`, `item/completed`, and
`item/commandExecution/delta`, which are emitted in both V1 and V2)
through the app-server
protocol. The new approval RPC is only sent when the user initiates a
turn with the new `turn/start` API so we don't break backwards
compatibility with VSCE.

The approach I took was to make as few changes to the Codex core as
possible, leveraging existing `EventMsg` core events, and translating
those in app-server. I did have to add additional fields to
`EventMsg::ExecCommandEndEvent` to capture the command's input so that
app-server can statelessly transform these events to a
`ThreadItem::CommandExecution` item for the `item/completed` event.

Once we stabilize the API and it's complete enough for our partners, we
can work on migrating the core to be aware of command execution items as
a first-class concept.

**Note**: We'll need followup work to make sure these APIs work for the
unified exec tool, but will wait til that's stable and landed before
doing a pass on app-server.

Example payloads below:
```
{
  "method": "item/started",
  "params": {
    "item": {
      "aggregatedOutput": null,
      "command": "/bin/zsh -lc 'touch /tmp/should-trigger-approval'",
      "cwd": "/Users/owen/repos/codex/codex-rs",
      "durationMs": null,
      "exitCode": null,
      "id": "call_lNWWsbXl1e47qNaYjFRs0dyU",
      "parsedCmd": [
        {
          "cmd": "touch /tmp/should-trigger-approval",
          "type": "unknown"
        }
      ],
      "status": "inProgress",
      "type": "commandExecution"
    }
  }
}
```

```
{
  "id": 0,
  "method": "item/commandExecution/requestApproval",
  "params": {
    "itemId": "call_lNWWsbXl1e47qNaYjFRs0dyU",
    "parsedCmd": [
      {
        "cmd": "touch /tmp/should-trigger-approval",
        "type": "unknown"
      }
    ],
    "reason": "Need to create file in /tmp which is outside workspace sandbox",
    "risk": null,
    "threadId": "019a93e8-0a52-7fe3-9808-b6bc40c0989a",
    "turnId": "1"
  }
}
```

```
{
  "id": 0,
  "result": {
    "acceptSettings": {
      "forSession": false
    },
    "decision": "accept"
  }
}
```

```
{
  "params": {
    "item": {
      "aggregatedOutput": null,
      "command": "/bin/zsh -lc 'touch /tmp/should-trigger-approval'",
      "cwd": "/Users/owen/repos/codex/codex-rs",
      "durationMs": 224,
      "exitCode": 0,
      "id": "call_lNWWsbXl1e47qNaYjFRs0dyU",
      "parsedCmd": [
        {
          "cmd": "touch /tmp/should-trigger-approval",
          "type": "unknown"
        }
      ],
      "status": "completed",
      "type": "commandExecution"
    }
  }
}
```
2025-11-18 00:23:54 +00:00
bb6fe78b9f LM Studio OSS Support (#2312)
## Overview

Adds LM Studio OSS support. Closes #1883


### Changes
This PR enhances the behavior of `--oss` flag to support LM Studio as a
provider. Additionally, it introduces a new flag`--local-provider` which
can take in `lmstudio` or `ollama` as values if the user wants to
explicitly choose which one to use.

If no provider is specified `codex --oss` will auto-select the provider
based on whichever is running.

#### Additional enhancements 
The default can be set using `oss-provider` in config like:

```
oss_provider = "lmstudio"
```

For non-interactive users, they will need to either provide the provider
as an arg or have it in their `config.toml`

### Notes
For best performance, [set the default context
length](https://lmstudio.ai/docs/app/advanced/per-model) for gpt-oss to
the maximum your machine can support

---------

Co-authored-by: Matt Clayton <[email protected]>
Co-authored-by: Eric Traut <[email protected]>
2025-11-17 11:49:09 -08:00
3292f33332 core/tui: non-blocking MCP startup (#6334)
This makes MCP startup not block TUI startup. Messages sent while MCPs
are booting will be queued.


https://github.com/user-attachments/assets/96e1d234-5d8f-4932-a935-a675d35c05e0


Fixes #6317

---------

Co-authored-by: pakrym-oai <[email protected]>
2025-11-17 11:26:11 -08:00