Commit Graph
5175 Commits
Author SHA1 Message Date
75d7d59222 fix(tui): propagate errors in insert_history_lines_to_writer (#4266)
## What?
Fixed error handling in `insert_history_lines_to_writer` where all
terminal operations were silently ignoring errors via `.ok()`.

  ## Why?
Silent I/O failures could leave the terminal in an inconsistent state
(e.g., scroll region not reset) with no way to debug. This violates Rust
error handling best practices.

  ## How?
  - Changed function signature to return `io::Result<()>`
  - Replaced all `.ok()` calls with `?` operator to propagate errors
- Added `tracing::warn!` in wrapper function for backward compatibility
  - Updated 15 test call sites to handle Result  with `.expect()`

  ## Testing
  - ✅ Pass all tests

  ## Type of Change
  - [x] Bug fix (non-breaking change)

---------

Signed-off-by: Huaiwu Li <[email protected]>
Co-authored-by: Eric Traut <[email protected]>
2025-10-30 18:07:51 -07:00
Ahmed IbrahimandGitHub ddf1d61924 override verbosity for gpt-5-codex (#6007)
we are seeing [reports](https://github.com/openai/codex/issues/6004) of
users having verbosity in their config.toml and facing issues.
gpt-5-codex doesn't accept other values rather than medium for
verbosity.
2025-10-31 00:45:05 +00:00
2e4af34de8 docs: Fix markdown list item spacing in codex-rs/core/review_prompt.md (#4144)
Fixes a Markdown parsing issue where a list item used `*` without a
following space (`*Line ranges ...`). Per CommonMark, a space after the
list marker is required. Updated to `* Line ranges ...` so the guideline
renders as a standalone bullet. This change improves readability and
prevents mis-parsing in renderers.

Co-authored-by: Eric Traut <[email protected]>
2025-10-30 17:39:21 -07:00
zhao-oaiandGitHub 6deef36a9d rate limit errors now provide absolute time (#6000) 2025-10-30 20:33:25 -04:00
Ahmed IbrahimandGitHub 6ab7e06af5 feat: add exit slash command alias for quit (#6002)
## Summary
- add the `/exit` slash command alongside `/quit` and reuse shared exit
handling
- refactor the chat widget to funnel quit, exit, logout, and shutdown
flows through a common `request_exit` helper
- add focused unit tests that confirm both `/quit` and `/exit` send an
`ExitRequest`

## Testing
- `just fmt`
- `just fix -p codex-tui`
- `cargo test -p codex-tui`


------
https://chatgpt.com/codex/tasks/task_i_6903d5a8f47c8321bf180f031f2fa330
2025-10-30 17:29:40 -07:00
Owen LinandGitHub 574dd09323 [app-server] refactor: split API types into v1 and v2 (#6005)
Makes it easier to figure out which types are defined in the old vs. new
API schema.
2025-10-30 23:56:55 +00:00
Ahmed IbrahimandGitHub fdb8cd9ec0 Remove last turn reasoning filtering (#5986) 2025-10-30 23:20:32 +00:00
Jeremy RoseandGitHub a85caf3409 build: 8mb stacks on win (#5997)
#5981 seems to be fixing what's actually a call stack overflow, maybe
this will fix it without disabling a feature?
2025-10-30 16:12:50 -07:00
iceweasel-oaiandGitHub 4b31cfb9ec Windows Sandbox - Alpha version (#4905)
- Added the new codex-windows-sandbox crate that builds both a library
entry point (run_windows_sandbox_capture) and a CLI executable to launch
commands inside a Windows restricted-token sandbox, including ACL
management, capability SID provisioning, network lockdown, and output
capture
(windows-sandbox-rs/src/lib.rs:167, windows-sandbox-rs/src/main.rs:54).
- Introduced the experimental WindowsSandbox feature flag and wiring so
Windows builds can opt into the sandbox:
SandboxType::WindowsRestrictedToken, the in-process execution path, and
platform sandbox selection now honor the flag (core/src/features.rs:47,
core/src/config.rs:1224, core/src/safety.rs:19,
core/src/sandboxing/mod.rs:69, core/src/exec.rs:79,
core/src/exec.rs:172).
- Updated workspace metadata to include the new crate and its
Windows-specific dependencies so the core crate can link against it
(codex-rs/
    Cargo.toml:91, core/Cargo.toml:86).
- Added a PowerShell bootstrap script that installs the Windows
toolchain, required CLI utilities, and builds the workspace to ease
development
    on the platform (scripts/setup-windows.ps1:1).
- Landed a Python smoke-test suite that exercises
read-only/workspace-write policies, ACL behavior, and network denial for
the Windows sandbox
    binary (windows-sandbox-rs/sandbox_smoketests.py:1).
2025-10-30 15:51:57 -07:00
James Peter a14aae91d0 fix(homebrew): track latest release (#354) 2025-10-31 08:27:04 +10:00
James Peter 86537b52c4 fix(auto-drive): salvage user-turn json (#353) 2025-10-31 08:08:19 +10:00
James Peter be3538b98f fix(cli/postinstall): rerun bootstrap when scripts skipped (#369) 2025-10-31 07:54:59 +10:00
Bernard NisetandGitHub c77ee5f94d fix: Update seatbelt policy for java on macOS (#3987)
# Summary

This PR is related to the Issue #3978 and contains a fix to the seatbelt
profile for macOS that allows to run java/jdk tooling from the sandbox.
I have found that the included change is the minimum change to make it
run on my machine.

There is a unit test added by codex when making this fix. I wonder if it
is useful since you need java installed on the target machine for it to
be relevant. I can remove it it is better.

Fixes #3978
2025-10-30 14:25:04 -07:00
Celia ChenandGitHub 6ff3802648 [Hygiene] Remove include_view_image_tool config (#5976)
There's still some debate about whether we want to expose
`tools.view_image` or `feature.view_image` so those are left unchanged
for now, but this old `include_view_image_tool` config is good-to-go.
Also updated the doc to reflect that `view_image` tool is now by default
true.
2025-10-30 13:23:24 -07:00
James Peter c703a34c3b fix(tui/update): ignore cached upstream upgrade metadata (#376)
- reject cached version.json written by the upstream repo so we don't keep prompting for 0.50.0
- stamp new cache entries with the just-every/code origin to avoid future mixups
- add regression tests covering legacy and current cache formats
2025-10-31 06:19:24 +10:00
9a06b204cb Documentation improvement: add missing period (#3754)
Pull request template, minimal:

---

### **What?**

Minor change (low-hanging fruit).

### **Why?**

To improve code quality or documentation with minimal risk and effort.

### **How?**

Edited directly via VSCode Editor.

---

**Checklist (pre-PR):**

* [x] I have read the CLA Document and hereby sign the CLA.
* [x] I reviewed the “Contributing” markdown file for this project.

*This template meets standard external (non-OpenAI) PR requirements and
signals compliance for maintainers.*

Co-authored-by: Eric Traut <[email protected]>
2025-10-30 13:01:33 -07:00
James Peter 3dbf368218 feat(core): include current date in environment context (#5965)
- add optional `current_date` field to `EnvironmentContext` so turn context carries ISO dates
- serialize `<current_date>` tags and extend comparisons/tests to tolerate deterministic values
- cover default date formatting with new unit tests
2025-10-31 05:54:47 +10:00
Owen LinandGitHub 1aa7339cec [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939)
We had this annotation everywhere in app-server APIs which made it so
that fields get serialized as `field?: T`, meaning if the field as
`None` we would omit the field in the payload. Removing this annotation
changes it so that we return `field: T | null` instead, which makes
codex app-server's API more aligned with the convention of public OpenAI
APIs like Responses.

Separately, remove the `#[ts(optional_fields = nullable)]` annotations
that were recently added which made all the TS types become `field?: T |
null` which is not great since clients need to handle undefined and
null.

I think generally it'll be best to have optional types be either:
- `field: T | null` (preferred, aligned with public OpenAI APIs)
- `field?: T` where we have to, such as types generated from the MCP
schema:
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.ts
(see changes to `mcp-types/`)

I updated @etraut-openai's unit test to check that all generated TS
types are one or the other, not both (so will error if we have a type
that has `field?: T | null`). I don't think there's currently a good use
case for that - but we can always revisit.
2025-10-30 18:18:53 +00:00
Anton PanasenkoandGitHub 7844254e91 [codex] add developer instructions (#5897)
we are using developer instructions for code reviews, we need to pass
them in cli as well.
2025-10-30 11:18:31 -07:00
Dylan HurdandGitHub 523256f64e chore: testing on freeform apply_patch (#5952)
## Summary
Duplicates the tests in `apply_patch_cli.rs`, but tests the freeform
apply_patch tool as opposed to the function call path. The good news is
that all the tests pass with zero logical tests, with the exception of
the heredoc, which doesn't really make sense in the freeform tool
context anyway.

@jif-oai since you wrote the original tests in #5557, I'd love your
opinion on the right way to DRY these test cases between the two. Happy
to set up a more sophisticated harness, but didn't want to go down the
rabbit hole until we agreed on the right pattern

## Testing
- [x] These are tests
2025-10-30 10:40:48 -07:00
jif-oaiandGitHub 2df28ad1bf nit: log rmcp_client (#5978) 2025-10-30 17:40:38 +00:00
James Peter 89e913e260 fix(tui): allow AltGr printable keys on Windows (#5922) 2025-10-31 02:14:21 +10:00
jif-oaiandGitHub 662052e0bf feat: compaction prompt configurable (#5959)
```
 codex -c compact_prompt="Summarize in bullet points"
 ```
2025-10-30 14:24:24 +00:00
Ahmed IbrahimandGitHub 7b38b80083 Pass initial history as an optional to codex delegate (#5950)
This will give us more freedom on controlling the delegation. i.e we can
fork our history and run `compact`.
2025-10-30 07:22:42 -07:00
GitHub Action ea7af8f403 docs(changelog): update for v0.4.7 [skip ci] 2025-10-30 14:06:59 +00:00
GitHub Action 8962918118 chore(release): 0.4.7 [skip ci] v0.4.7 2025-10-30 14:05:13 +00:00
James Peter 4cc0199e25 Merge origin/main: adopt v0.4.6 release metadata 2025-10-30 23:46:06 +10:00
James Peter 794fb3e22d fix(tui/auto-drive): keep router answers in transcript 2025-10-30 23:40:22 +10:00
James Peter d9d8b13bca fix(tui/auto-drive): persist diagnostics follow-up turns 2025-10-30 23:31:42 +10:00
jif-oaiandGitHub 8e65eb4bc0 chore: unify config crates (#5958) 2025-10-30 10:28:32 +00:00
Ahmed IbrahimandGitHub 6168d187eb Send delegate header (#5942)
Send delegate type header
2025-10-30 09:49:40 +00:00
GitHub Action 14ee940249 docs(changelog): update for v0.4.6 [skip ci] 2025-10-30 09:31:35 +00:00
GitHub Action 5c8ae321b1 chore(release): 0.4.6 [skip ci] v0.4.6 2025-10-30 09:29:09 +00:00
James Peter d7511d0bbc fix(build-fast): drop release notes gate closes #374 2025-10-30 19:08:20 +10:00
James Peter b8f4935b27 fix(build-fast): sync release notes version 2025-10-30 19:04:47 +10:00
GitHub Action 87dcc2c31b chore(release): 0.4.5 [skip ci] v0.4.5 2025-10-30 07:36:30 +00:00
James Peter ce5087ed86 role:user 2025-10-30 17:25:00 +10:00
James Peter 9bedbc3b2c test(core): expect verbosity in strict text (by-design) 2025-10-30 17:08:55 +10:00
James Peter fbf8a86699 feat(auto-drive): relax agent limits and refresh guidance 2025-10-30 16:24:47 +10:00
James Peter f0ef4cd142 fix(auto-drive): make coordinator prompt standalone 2025-10-30 16:14:27 +10:00
Ahmed IbrahimandGitHub f32a551537 Add debug-only slash command for rollout path (#5936)
## Summary
- add a debug-only `/rollout` slash command that prints the rollout file
path or reports when none is known
- surface the new command in the slash command metadata and cover it
with unit tests

<img width="539" height="99" alt="image"
src="https://github.com/user-attachments/assets/688e1334-8a06-4576-abb8-ada33b458661"
/>
2025-10-30 03:51:00 +00:00
James Peter 9a541be43a fix(auto-drive): prefer reasoning-high GPT-5 with low verbosity 2025-10-30 12:29:30 +10:00
James Peter 848a119736 fix(tui/limits): align history columns and hide stale compact block
Switch history tables to a three-column layout with cached and cost/saved values, preserve indentation by disabling trim, and skip the compact limit section when auto-compaction data is unavailable for the viewed account.
2025-10-30 12:01:33 +10:00
zhao-oaiandGitHub fbd3353db4 asdf (#5940)
.
2025-10-30 01:10:41 +00:00
Ahmed IbrahimandGitHub e476cc4db0 ignore agent message deltas for the review mode (#5937)
The deltas produce the whole json output. ignore them.
2025-10-30 00:47:55 +00:00
pakrym-oaiandGitHub b7540f39fb Re-enable SDK image forwarding test (#5934)
## Summary
- re-enable the TypeScript SDK test that verifies local images are
forwarded to `codex exec`

## Testing
- `pnpm test` *(fails: unable to download pnpm 10.8.1 because external
network access is blocked in the sandbox)*

------
https://chatgpt.com/codex/tasks/task_i_690289cb861083209fd006867e2adfb1
2025-10-29 23:18:26 +00:00
203e7b9200 Add item streaming events (#5546)
Adds AgentMessageContentDelta, ReasoningContentDelta,
ReasoningRawContentDelta item streaming events while maintaining
compatibility for old events.

---------

Co-authored-by: Owen Lin <[email protected]>
2025-10-29 22:33:57 +00:00
James Peter 4bc6a691e0 Merge branch 'code-branch-20251029-083345' into main 2025-10-30 08:26:39 +10:00
pakrym-oaiandGitHub 0a25455848 [exec] Add MCP tool arguments and results (#5899)
Extends mcp_tool_call item to include arguments and results.
2025-10-29 14:23:57 -07:00
Ahmed IbrahimandGitHub 67f3b3b120 Delegate review to codex instance (#5572)
In this PR, I am exploring migrating task kind to an invocation of
Codex. The main reason would be getting rid off multiple
`ConversationHistory` state and streamlining our context/history
management.

This approach depends on opening a channel between the sub-codex and
codex. This channel is responsible for forwarding `interactive`
(`approvals`) and `non-interactive` events. The `task` is responsible
for handling those events.

This opens the door for implementing `codex as a tool`, replacing
`compact` and `review`, and potentially subagents.

One consideration is this code is very similar to `app-server` specially
in the approval part. If in the future we wanted an interactive
`sub-codex` we should consider using `codex-mcp`
2025-10-29 21:04:25 +00:00