Commit Graph

2476 Commits

Author SHA1 Message Date
Michael Bolin
2b1937dca1 Merge 7230d22ad4 into sapling-pr-archive-bolinfest 2025-08-06 10:52:06 -07:00
Michael Bolin
7230d22ad4 feat: include path to rollout file in /status output 2025-08-06 10:51:48 -07:00
Michael Bolin
ca62560651 Merge 494526d2d1 into sapling-pr-archive-bolinfest 2025-08-06 09:53:40 -07:00
Michael Bolin
494526d2d1 fix: add more instructions to ensure GitHub Action reviews only the necessary code 2025-08-06 09:52:28 -07:00
Michael Bolin
2c145ee45d Merge bf506c2ee2 into sapling-pr-archive-bolinfest 2025-08-06 09:30:36 -07:00
Michael Bolin
bf506c2ee2 chore: rename INIT.md to prompt_for_init_command.md and move closer to usage 2025-08-06 09:30:19 -07:00
Charlie Weems
ffe24991b7 Initial implementation of /init (#1822)
Basic /init command that appends an instruction to create AGENTS.md to
the conversation history.
2025-08-06 09:10:23 -07:00
Dylan
dc468d563f [env] Remove git config for now (#1884)
## Summary
Forgot to remove this in #1869 last night! Too much of a performance hit
on the main thread. We can bring it back via an async thread on startup.
2025-08-06 08:05:17 -07:00
Dylan
3e8bcf0247 [prompts] Add <environment_context> (#1869)
## Summary
Includes a new user message in the api payload which provides useful
environment context for the model, so it knows about things like the
current working directory and the sandbox.

## Testing
Updated unit tests
2025-08-06 01:13:31 -07:00
Michael Bolin
a400225476 merge commit for archive created by Sapling 2025-08-06 00:18:24 -07:00
Michael Bolin
22440c4c06 fix: try to reduce public API of crates to speed up incremental builds 2025-08-06 00:17:14 -07:00
Dylan
cda39e417f [tests] Investigate flakey mcp-server test (#1877)
## Summary
Have seen these tests flaking over the course of today on different
boxes. `wiremock` seems to be generally written with tokio/threads in
mind but based on the weird panics from the tests, let's see if this
helps.
2025-08-06 00:07:58 -07:00
Michael Bolin
a26b47800f Merge 66a5929082 into sapling-pr-archive-bolinfest 2025-08-06 00:07:56 -07:00
Michael Bolin
66a5929082 fix: try to reduce public API of crates to speed up incremental builds 2025-08-06 00:07:45 -07:00
Michael Bolin
dc97ad8ec1 Merge 966480e4af into sapling-pr-archive-bolinfest 2025-08-05 23:59:06 -07:00
Michael Bolin
966480e4af fix: try to reduce public API of crates to speed up incremental builds 2025-08-05 23:58:26 -07:00
ae
d642b07fcc [feat] add /status slash command (#1873)
- Added a `/status` command, which will be useful when we update the
home screen to print less status.
- Moved `create_config_summary_entries` to common since it's used in a
few places.
- Noticed we inconsistently had periods in slash command descriptions
and just removed them everywhere.
- Noticed the diff description was overflowing so made it shorter.
2025-08-05 23:57:52 -07:00
Michael Bolin
7b3ab968a0 docs: add more detail to the codex-rust-review (#1875)
This PR attempts to break `codex-rust-review.md` into sections so that
it is easier to consume.

It also adds a healthy new section on "Assertions in Tests" that has
been on my mind for awhile.
2025-08-06 06:36:10 +00:00
Michael Bolin
02e7965228 fix: add stricter checks and better error messages to create_github_release.sh (#1874)
This script attempts to verify that:

- You have no local, uncommitted changes.
- You are on `main`
- The commit you are on exists on `main` also exists on the origin
`https://github.com/openai/codex`, i.e., it is not just a commit you
have pushed to your local version of `main`

As part of this, try to print better error message if/when these
conditions are violated.
2025-08-05 23:33:21 -07:00
Michael Bolin
e80dce44db Merge 12e5cf9f2f into sapling-pr-archive-bolinfest 2025-08-05 23:31:07 -07:00
Michael Bolin
12e5cf9f2f docs: add more detail to the codex-rust-review 2025-08-05 23:30:49 -07:00
Michael Bolin
0332fcb71c merge commit for archive created by Sapling 2025-08-05 23:25:10 -07:00
Michael Bolin
3bbb30f986 fix: provide better error messages in create_github_release.sh 2025-08-05 23:24:30 -07:00
Michael Bolin
d47bc2382c Merge e7e24c019a into sapling-pr-archive-bolinfest 2025-08-05 23:21:50 -07:00
Michael Bolin
e7e24c019a fix: provide better error messages in create_github_release.sh 2025-08-05 23:21:24 -07:00
Michael Bolin
493e4c9463 fix: only tag as prerelease when the version has an -alpha or -beta suffix (#1872)
Hardcoding to `prerelease: true` is a holdover from before we had
migrated to the Rust CLI for releases and decided on how we were doing
version numbers.

To date, I have had to change the release status from "prerelease" to
"actual release" manually through the GitHub Releases web page. This is
a semi-serious problem because I've discovered that it messes up
Homebrew's automation if the version number _looks_ like a real release
but turns out to be a prerelease. The release potentially gets skipped
from being published on Homebrew, so it's important to set the value
correctly from the start.

I verified that `steps.release_name.outputs.name` does not include the
`rust-v` prefix from the tag name.
2025-08-05 23:11:29 -07:00
ae
1f7003b476 tweak comment (#1871)
Belatedly address CR feedback about a comment.

------
https://chatgpt.com/codex/tasks/task_i_6892e8070be4832cba379f2955f5b8bc
2025-08-05 23:02:00 -07:00
Michael Bolin
64bc520a9e Merge 65567df852 into sapling-pr-archive-bolinfest 2025-08-05 23:01:08 -07:00
Michael Bolin
65567df852 fix: only tag as prerelease when the version has an -alpha or -beta suffix 2025-08-05 23:00:48 -07:00
Michael Bolin
eaf2fb5b4f fix: fully enumerate EventMsg in chatwidget.rs (#1866)
https://github.com/openai/codex/pull/1868 is a related fix that was in
flight simultaenously, but after talking to @easong-openai, this:

- logs instead of renders for `BackgroundEvent`
- logs for `TurnDiff`
- renders for `PatchApplyEnd`
2025-08-05 22:44:27 -07:00
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
easong-openai
f8d70d67b6 Add OSS model info (#1860)
Add somewhat arbitrarily chosen context window/output limit.
2025-08-05 22:35:00 -07:00
easong-openai
966d957faf fixes no git repo warning (#1863)
Fix broken git warning

<img width="797" height="482" alt="broken-screen"
src="https://github.com/user-attachments/assets/9c52ed9b-13d8-4f1d-bb37-7c51acac615d"
/>
2025-08-05 22:34:14 -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`:


ea7d3f27bd/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