Commit Graph
2444 Commits
Author SHA1 Message Date
Michael Bolin bb522022b7 merge commit for archive created by Sapling 2025-08-05 22:39:09 -07:00
Michael Bolin b2b1cdbec4 fix: fully enumerate EventMsg in chatwidget.rs 2025-08-05 22:38:53 -07:00
Michael Bolin 09ea2141a6 merge commit for archive created by Sapling 2025-08-05 22:31:45 -07:00
Michael Bolin 5f1906eb81 fix: fully enumerate EventMsg in chatwidget.rs 2025-08-05 22:31:19 -07:00
ae b90c15abc4 clear terminal on launch (#1870) 2025-08-05 22:01:34 -07:00
aibrahim-oai 31dcae67db Remove Turndiff and Apply patch from the render (#1868)
Make the tui more specific on what to render. Apply patch End and Turn
diff needs special handling.

Avoiding this issue:

<img width="503" height="138" alt="image"
src="https://github.com/user-attachments/assets/4c010ea8-701e-46d2-aa49-88b37fe0e5d9"
/>
2025-08-05 21:32:03 -07:00
Dylan 725dd6be6a [approval_policy] Add OnRequest approval_policy (#1865)
## Summary
A split-up PR of #1763 , stacked on top of a tools refactor #1858 to
make the change clearer. From the previous summary:

> Let's try something new: tell the model about the sandbox, and let it
decide when it will need to break the sandbox. Some local testing
suggests that it works pretty well with zero iteration on the prompt!

## Testing
- [x] Added unit tests
- [x] Tested locally and it appears to work smoothly!
2025-08-05 20:44:20 -07:00
Michael Bolin d7b5cb12d9 Merge eb200ca913 into sapling-pr-archive-bolinfest 2025-08-05 19:57:21 -07:00
Michael Bolin eb200ca913 fix: fully enumerate EventMsg in chatwidget.rs 2025-08-05 19:57:05 -07:00
Dylan aff97ed7dd [core] Separate tools config from openai client (#1858)
## Summary
In an effort to make tools easier to work with and more configurable,
I'm introducing `ToolConfig` and updating `Prompt` to take in a general
list of Tools. I think this is simpler and better for a few reasons:
- We can easily assemble tools from various sources (our own harness,
mcp servers, etc.) and we can consolidate the logic for constructing the
logic in one place that is separate from serialization.
- client.rs no longer needs arbitrary config values, it just takes in a
list of tools to serialize

A hefty portion of the PR is now updating our conversion of
`mcp_types::Tool` to `OpenAITool`, but considering that @bolinfest
accurately called this out as a TODO long ago, I think it's time we
tackled it.

## Testing
- [x] Experimented locally, no changes, as expected
- [x] Added additional unit tests
- [x] Responded to rust-review
2025-08-05 19:27:52 -07:00
Michael Bolin afa8f0d617 fix: exit cleanly when ShutdownComplete is received (#1864)
Previous to this PR, `ShutdownComplete` was not being handled correctly
in `codex exec`, so it always ended up printing the following to stderr:

```
ERROR codex_exec: Error receiving event: InternalAgentDied
```

Because we were not breaking out of the loop for `ShutdownComplete`,
inevitably `codex.next_event()` would get called again and
`rx_event.recv()` would fail and the error would get mapped to
`InternalAgentDied`:


https://github.com/openai/codex/blob/ea7d3f27bdc1da61df979419515889f64f36c5ce/codex-rs/core/src/codex.rs#L190-L197

For reference, https://github.com/openai/codex/pull/1647 introduced the
`ShutdownComplete` variant.
2025-08-05 19:19:36 -07:00
Michael Bolin d2cb167943 Merge de81606a39 into sapling-pr-archive-bolinfest 2025-08-05 18:44:17 -07:00
Michael Bolin de81606a39 fix: exit cleanly when ShutdownComplete is received 2025-08-05 18:43:59 -07:00
Dylan ea7d3f27bd [core] Stop escalating timeouts (#1853)
## Summary
Escalating out of sandbox is (almost always) not going to fix
long-running commands timing out - therefore we should just pass the
failure back to the model instead of asking the user to re-run a command
that took a long time anyway.

## Testing
- [x] Ran locally with a timeout and confirmed this worked as expected
2025-08-05 17:52:25 -07:00
ae f6c8d1117c [feat] make approval key matching case insensitive (#1862) 2025-08-05 15:50:06 -07:00
Michael Bolin 42bd73e150 chore: remove unnecessary default_ prefix (#1854)
This prefix is not inline with the other fields on the `ConfigOverrides`
struct.
2025-08-05 14:42:49 -07:00
Michael Bolin 03ced80d9a Merge 9ff7306219 into sapling-pr-archive-bolinfest 2025-08-05 13:58:28 -07:00
Michael Bolin 9ff7306219 chore: remove unnecessary default_ prefix 2025-08-05 13:58:08 -07:00
Michael Bolin d365cae077 fix: when using --oss, ensure correct configuration is threaded through correctly (#1859)
This PR started as an investigation with the goal of eliminating the use
of `unsafe { std::env::set_var() }` in `ollama/src/client.rs`, as
setting environment variables in a multithreaded context is indeed
unsafe and these tests were observed to be flaky, as a result.

Though as I dug deeper into the issue, I discovered that the logic for
instantiating `OllamaClient` under test scenarios was not quite right.
In this PR, I aimed to:

- share more code between the two creation codepaths,
`try_from_oss_provider()` and `try_from_provider_with_base_url()`
- use the values from `Config` when setting up Ollama, as we have
various mechanisms for overriding config values, so we should be sure
that we are always using the ultimate `Config` for things such as the
`ModelProviderInfo` associated with the `oss` id

Once this was in place,
`OllamaClient::try_from_provider_with_base_url()` could be used in unit
tests for `OllamaClient` so it was possible to create a properly
configured client without having to set environment variables.
2025-08-05 13:55:32 -07:00
Michael Bolin 359bd892dc merge commit for archive created by Sapling 2025-08-05 13:30:32 -07:00
Michael Bolin 3779c2ddd1 fix: remove unsafe blocks and use of set_var(), as it is unsafe 2025-08-05 13:30:17 -07:00
Michael Bolin aebf4d3b73 merge commit for archive created by Sapling 2025-08-05 13:25:19 -07:00
Michael Bolin b9c7dd430e fix: remove unsafe blocks and use of set_var(), as it is unsafe 2025-08-05 13:25:05 -07:00
Michael Bolin bc511deb3f merge commit for archive created by Sapling 2025-08-05 13:21:37 -07:00
Michael Bolin 8ea22920b0 fix: remove unsafe blocks and use of set_var(), as it is unsafe 2025-08-05 13:21:19 -07:00
Michael Bolin f1d45a9315 merge commit for archive created by Sapling 2025-08-05 13:17:43 -07:00
Michael Bolin 3270011a6c fix: remove unsafe blocks and use of set_var(), as it is unsafe 2025-08-05 13:17:25 -07:00
Michael Bolin 63701e4987 Merge 51108b909b into sapling-pr-archive-bolinfest 2025-08-05 12:34:41 -07:00
Michael Bolin 51108b909b fix: remove unsafe blocks and use of set_var(), as it is unsafe 2025-08-05 12:34:26 -07:00
Michael Bolin 810e89c376 Merge 33d8732694 into sapling-pr-archive-bolinfest 2025-08-05 11:48:59 -07:00
Michael Bolin 33d8732694 chore: remove unnecessary default_ prefix 2025-08-05 11:48:41 -07:00
Michael Bolin 0c5fa271bc fix: README ToC did not match contents (#1857)
Similar to https://github.com/openai/codex/pull/1855, this got through.

Fixed by running:

```
python3 scripts/readme_toc.py --fix README.md
```
2025-08-05 11:48:28 -07:00
Michael Bolin d9ebcda578 Merge 623c6355cf into sapling-pr-archive-bolinfest 2025-08-05 11:47:32 -07:00
Michael Bolin 623c6355cf fix: README ToC did not match contents 2025-08-05 11:47:15 -07:00
Michael Bolin d29ad70f17 Merge ff719f645b into sapling-pr-archive-bolinfest 2025-08-05 11:45:02 -07:00
Michael Bolin ff719f645b chore: remove unnecessary default_ prefix 2025-08-05 11:44:30 -07:00
Michael Bolin bd24bc320e fix: clean out some ASCII (#1856)
Similar to https://github.com/openai/codex/pull/1855, this got through.

Fixed by running:

```
./scripts/asciicheck.py README.md
```
2025-08-05 11:44:04 -07:00
Michael Bolin aa5147a86a Merge 157a9d0c3e into sapling-pr-archive-bolinfest 2025-08-05 11:43:23 -07:00
Michael Bolin 157a9d0c3e fix: clean out some ASCII 2025-08-05 11:43:07 -07:00
Michael Bolin 9edd12378e Merge 1243bb03bf into sapling-pr-archive-bolinfest 2025-08-05 11:40:16 -07:00
Michael Bolin 1243bb03bf chore: remove unnecessary default_ prefix 2025-08-05 11:39:53 -07:00
Michael Bolin 9f91b3da24 fix: correct spelling error that sneaked through (#1855)
I ended up force-pushing https://github.com/openai/codex/pull/1848
because CI jobs were not being triggered after updating the PR on
GitHub, so this spelling error sneaked through.
2025-08-05 11:39:30 -07:00
Michael Bolin bc00177bcf Merge 145df4556e into sapling-pr-archive-bolinfest 2025-08-05 11:38:26 -07:00
Michael Bolin 145df4556e fix: correct spelling error that sneaked through 2025-08-05 11:38:10 -07:00
Michael Bolin 4582400739 merge commit for archive created by Sapling 2025-08-05 11:36:22 -07:00
Michael Bolin d6cfe922f2 chore: remove unnecessary default_ prefix 2025-08-05 11:36:01 -07:00
easong-openaiandMichael Bolin 9285350842 Introduce --oss flag to use gpt-oss models (#1848)
This adds support for easily running Codex backed by a local Ollama
instance running our new open source models. See
https://github.com/openai/gpt-oss for details.

If you pass in `--oss` you'll be prompted to install/launch ollama, and
it will automatically download the 20b model and attempt to use it.

We'll likely want to expand this with some options later to make the
experience smoother for users who can't run the 20b or want to run the
120b.

Co-authored-by: Michael Bolin <mbolin@openai.com>
2025-08-05 11:31:11 -07:00
Michael Bolin 5e19415a76 merge commit for archive created by Sapling 2025-08-05 11:20:26 -07:00
Michael Bolin 95abf99e71 feat: add a built-in model provider named "oss" 2025-08-05 11:19:49 -07:00
Michael Bolin 4220fce51d merge commit for archive created by Sapling 2025-08-05 02:34:32 -07:00