Skip to content

Merge origin/main, resolve merge conflicts, and fix tests - #1

Closed
scottleibrand wants to merge 15 commits into
binbandit:feat/rate-limit-backofffrom
scottleibrand:feat/rate-limit-backoff
Closed

scottleibrand wants to merge 15 commits into
binbandit:feat/rate-limit-backofffrom
scottleibrand:feat/rate-limit-backoff

Conversation

@scottleibrand

Copy link
Copy Markdown

Feel free to ignore this if you'd rather do so yourself, but since I did it locally I thought it might be easier this way to help get openai#176 merged faster.

tibo-openai and others added 15 commits April 21, 2025 09:51
…enai#473)

This PR tidies up primitives under storage/.

**Noop changes:**

* Promote logger implementation to top-level utility outside of agent/
* Use logger within storage primitives
* Cleanup doc strings and comments

**Functional changes:**

* Increase command history size to 10_000
* Remove unnecessary debounce implementation and ensure a session ID is
created only once per agent loop

---------

Signed-off-by: Thibault Sottiaux <tibo@openai.com>
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
Another one that I noticed.

The dist structure is very simple rn, so unlikely to run into orphaned
files as you're emitting a single built artifact which wil be
overwritten on build, but I always prefer to do clean builds as
"hygiene".

I had a dirty dist personally after local development and testing some
things, as an example.

Alternatives could be to create a `clean` script with cross platform
`rimraf dist`
…cator (openai#425)

## What does this PR do?
* Implements the full `/clear` command in **codex‑cli**:
  * Resets chat history **and** wipes the terminal screen.
  * Shows a single system message: `Context cleared`.
* Adds comprehensive unit tests for the new behaviour.

## Why is it needed?
* Fixes user‑reported bugs:  
  * **openai#395**  
  * **openai#405**

## How is it implemented?
* **Code** – Adds `process.stdout.write('\x1b[3J\x1b[H\x1b[2J')` in
`terminal.tsx`. Removed reference to `prev` in `
        setItems((prev) => [
          ...prev,
` in `terminal-chat-new-input.tsx` & `terminal-chat-input.tsx`.

## CI / QA
All commands pass locally:
```bash
pnpm test      # green
pnpm run lint  # green
pnpm run typecheck  # zero TS errors
```

## Results



https://github.com/user-attachments/assets/11dcf05c-e054-495a-8ecb-ac6ef21a9da4

---------

Co-authored-by: Thibault Sottiaux <tibo@openai.com>
Reverts openai#386 because:

* The parsing logic for shell commands was unsafe (`split(/\s+/)`
instead of something like `shell-quote`)
* We have a different plan for supporting auto-approved commands.
Publish shouldn't need the source files published along with the
distributable bin.

`src` is being shipped to the registry rn:
https://www.npmjs.com/package/@openai/codex?activeTab=code

You can verify that the src is not needed by packing the project
manually after removing src from the files:

```sh
# from the codex-cli dir
rm -rf dist # just for hygiene
pnpm run build
pnpm pack

mkdir /tmp/codex-tar-test
mv openai-codex-0.1.2504181820.tgz /tmp/codex-tar-test
cd /tmp/codex-tar-test

pnpm init
pnpm add ./openai-codex-0.1.2504181820.tgz /tmp/codex-tar-test
pnpm exec codex --full-auto "run a bash -c command to echo hello world"
```

The cli is operational

> noticed this when checking the screenshot included in
openai#461
…e files or spawn commands (openai#482)

Updates `isSafeCommand()` so that an invocation of `find` is not
auto-approved if it contains any of: `-exec`, `-execdir`, `-ok`,
`-okdir`, `-delete`, `-fls`, `-fprint`, `-fprint0`, `-fprintf`.
## `0.1.2504211509`

### 🚀 Features

- Support multiple providers via Responses-Completion transformation
(openai#247)
- Add user-defined safe commands configuration and approval logic openai#380
(openai#386)
- Allow switching approval modes when prompted to approve an
edit/command (openai#400)
- Add support for `/diff` command autocomplete in TerminalChatInput
(openai#431)
- Auto-open model selector if user selects deprecated model (openai#427)
- Read approvalMode from config file (openai#298)
- `/diff` command to view git diff (openai#426)
- Tab completions for file paths (openai#279)
- Add /command autocomplete (openai#317)
- Allow multi-line input (openai#438)

### 🐛 Bug Fixes

- `full-auto` support in quiet mode (openai#374)
- Enable shell option for child process execution (openai#391)
- Configure husky and lint-staged for pnpm monorepo (openai#384)
- Command pipe execution by improving shell detection (openai#437)
- Name of the file not matching the name of the component (openai#354)
- Allow proper exit from new Switch approval mode dialog (openai#453)
- Ensure /clear resets context and exclude system messages from
approximateTokenUsed count (openai#443)
- `/clear` now clears terminal screen and resets context left indicator
(openai#425)
- Correct fish completion function name in CLI script (openai#485)
- Auto-open model-selector when model is not found (openai#448)
- Remove unnecessary isLoggingEnabled() checks (openai#420)
- Improve test reliability for `raw-exec` (openai#434)
- Unintended tear down of agent loop (openai#483)
- Remove extraneous type casts (openai#462)
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


3 out of 9 committers have signed the CLA.
✅ (tibo-openai)[https://github.com/tibo-openai]
✅ (bolinfest)[https://github.com/bolinfest]
✅ (fouad-openai)[https://github.com/fouad-openai]
❌ @jonchurch
❌ @nerdielol
❌ @benny123tw
❌ @Mitch528
❌ @dnakov
❌ @scottleibrand
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@scottleibrand

Copy link
Copy Markdown
Author

@tibo-openai looks like the CLA Assistant is unhelpfully blocking merges between codex forks due to preexisting code being merged from origin/main that it incorrectly (at least in my case) flags as not having signed the CLA. Can we update the CLA Assistant to only run on PRs to openai/codex?

@dnakov

dnakov commented Apr 22, 2025

Copy link
Copy Markdown

It seems like you should rebase, apply your changes and force push to your fork

@scottleibrand

Copy link
Copy Markdown
Author

Ok, thx, I'll try that next time. For now I've moved on to openai#506 instead. Feel free to use or close this as you see fit.

@scottleibrand

Copy link
Copy Markdown
Author

Closing: this targeted the TypeScript codex-cli, which upstream has since replaced with the Rust implementation, so the merge is no longer needed. Thanks! -Claude (Scott Leibrand)

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
@scottleibrand
scottleibrand deleted the feat/rate-limit-backoff branch October 23, 2026 05:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants