Commit Graph

2497 Commits

Author SHA1 Message Date
Michael Bolin
b437fdcaa0 Merge 713eb0dbf0 into sapling-pr-archive-bolinfest 2025-08-06 16:20:37 -07:00
Michael Bolin
713eb0dbf0 chore: introduce ModelFamily.requires_chatgpt_auth 2025-08-06 16:20:32 -07:00
Michael Bolin
cd069e87d8 Merge fe76b496b7 into sapling-pr-archive-bolinfest 2025-08-06 16:19:24 -07:00
Michael Bolin
fe76b496b7 chore: introduce ModelFamily.requires_chatgpt_auth 2025-08-06 16:19:18 -07:00
pap-openai
af8c1cdf12 fix meta+b meta+f (option+left/right) (#1895)
Option+Left or Option+Right should move cursor to beginning/end of the
word.

We weren't listening to what terminals are sending (on MacOS) and were
therefore printing b or f instead of moving cursor. We were actually in
the first match clause and returning char insertion
(https://github.com/openai/codex/pull/1895/files#diff-6bf130cd00438cc27a38c5a4d9937a27cf9a324c191de4b74fc96019d362be6dL209)

Tested on Apple Terminal, iTerm, Ghostty
2025-08-06 16:16:47 -07:00
pakrym-oai
57c973b571 Add 2025-08-06 model family (#1899) 2025-08-06 23:14:02 +00:00
Gabriel Peal
2d5de795aa First pass at a TUI onboarding (#1876)
This sets up the scaffolding and basic flow for a TUI onboarding
experience. It covers sign in with ChatGPT, env auth, as well as some
safety guidance.

Next up:
1. Replace the git warning screen
2. Use this to configure default approval/sandbox modes


Note the shimmer flashes are from me slicing the video, not jank.

https://github.com/user-attachments/assets/0fbe3479-fdde-41f3-87fb-a7a83ab895b8
2025-08-06 18:22:14 -04:00
Michael Bolin
c9f006d6dd merge commit for archive created by Sapling 2025-08-06 14:59:32 -07:00
Michael Bolin
fde2b273d1 feat: include path to rollout file in /status output 2025-08-06 14:59:25 -07:00
Dylan
f25b2e8e2c Propagate apply_patch filesystem errors (#1892)
## Summary
We have been returning `exit code 0` from the apply patch command when
writes fail, which causes our `exec` harness to pass back confusing
messages to the model. Instead, we should loudly fail so that the
harness and the model can handle these errors appropriately.

Also adds a test to confirm this behavior.

## Testing
- `cargo test -p codex-apply-patch`
2025-08-06 14:58:53 -07:00
ae
a575effbb0 feat: interrupt running task on ctrl-z (#1880)
- Arguably a bugfix as previously CTRL-Z didn't do anything.
- Only in TUI mode for now. This may make sense in other modes... to be
researched.
- The TUI runs the terminal in raw mode and the signals arrive as key
events, so we handle CTRL-Z as a key event just like CTRL-C.
- Not adding UI for it as a composer redesign is coming, and we can just
add it then.
- We should follow with CTRL-Z a second time doing the native terminal
action.
2025-08-06 21:56:34 +00:00
ae
6cef86f05b feat: update launch screen (#1881)
- Updates the launch screen to:
  ```
  >_ You are using OpenAI Codex in ~/code/codex/codex-rs
  
   Try one of the following commands to get started:
  
   1. /init - Create an AGENTS.md file with instructions for Codex
   2. /status - Show current session configuration and token usage
   3. /compact - Compact the chat history
   4. /new - Start a new chat
   ```
- These aren't the perfect commands, but as more land soon we can
update.
- We should also add logic later to make /init only show when there's no
existing AGENTS.md.
- Majorly need to iterate on copy.

<img width="905" height="769" alt="image"
src="https://github.com/user-attachments/assets/5912939e-fb0e-4e76-94ff-785261e2d6ee"
/>
2025-08-06 14:36:48 -07:00
pakrym-oai
8262ba58b2 Prefer env var auth over default codex auth (#1861)
## Summary
- Prioritize provider-specific API keys over default Codex auth when
building requests
- Add test to ensure provider env var auth overrides default auth

## Testing
- `just fmt`
- `just fix` *(fails: `let` expressions in this position are unstable)*
- `cargo test --all-features` *(fails: `let` expressions in this
position are unstable)*

------
https://chatgpt.com/codex/tasks/task_i_68926a104f7483208f2c8fd36763e0e3
2025-08-06 13:02:00 -07:00
Jeremy Rose
081caa5a6b show a transient history cell for commands (#1824)
Adds a new "active history cell" for history bits that need to render
more than once before they're inserted into the history. Only used for
commands right now.


https://github.com/user-attachments/assets/925f01a0-e56d-4613-bc25-fdaa85d8aea5

---------

Co-authored-by: easong-openai <easong@openai.com>
2025-08-06 12:03:45 -07:00
Michael Bolin
4344537742 chore: rename INIT.md to prompt_for_init_command.md and move closer to usage (#1886)
Addressing my post-commit review feedback on
https://github.com/openai/codex/pull/1822.
2025-08-06 11:58:57 -07:00
Michael Bolin
64f2f2eca2 fix: support $CODEX_HOME/AGENTS.md instead of $CODEX_HOME/instructions.md (#1891)
The docs and code do not match. It turns out the docs are "right" in
they are what we have been meaning to support, so this PR updates the
code:


ae88b69b09/README.md (L298-L302)

Support for `instructions.md` is a holdover from the TypeScript CLI, so
we are just going to drop support for it altogether rather than maintain
it in perpetuity.
2025-08-06 11:48:03 -07:00
Michael Bolin
9e2060cd0d Merge 1ad3e49919 into sapling-pr-archive-bolinfest 2025-08-06 11:38:19 -07:00
Michael Bolin
1ad3e49919 fix: support $CODEX_HOME/AGENTS.md instead of $CODEX_HOME/instructions.md 2025-08-06 11:32:07 -07:00
Michael Bolin
54c4f12a62 Merge ba025cbbb0 into sapling-pr-archive-bolinfest 2025-08-06 11:11:49 -07:00
Michael Bolin
ba025cbbb0 fix: support $CODEX_HOME/AGENTS.md instead of $CODEX_HOME/instructions.md 2025-08-06 11:11:31 -07:00
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
ae88b69b09 fix: add more instructions to ensure GitHub Action reviews only the necessary code (#1887)
Empirically, we have seen the GitHub Action comment on code outside of
the PR, so try to provide additional instructions in the prompt to avoid
this.
2025-08-06 10:39:58 -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