From fcb62a0fa5e81beb46483f64bea06a68dde5476b Mon Sep 17 00:00:00 2001 From: Jeremy Rose <172423086+nornagon-openai@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:04:32 -0700 Subject: [PATCH 1/4] tui: hide '/init' suggestion when AGENTS.md exists (#3038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hide the “/init” suggestion in the new-session banner when an `AGENTS.md` exists anywhere from the repo root down to the current working directory. Changes - Conditional suggestion: use `discover_project_doc_paths(config)` to suppress `/init` when agents docs are present. - TUI style cleanup: switch banner construction to `Stylize` helpers (`.bold()`, `.dim()`, `.into()`), avoiding `Span::styled`/`Span::raw`. - Fixture update: remove `/init` line in `tui/tests/fixtures/ideal-binary-response.txt` to match the new banner. Validation - Ran formatting and scoped lint fixes: `just fmt` and `just fix -p codex-tui`. - Tests: `cargo test -p codex-tui` passed (`176 passed, 0 failed`). Notes - No change to the `/init` command itself; only the welcome banner now adapts based on presence of `AGENTS.md`. --- codex-rs/tui/src/history_cell.rs | 94 +++++++++++--------------------- 1 file changed, 33 insertions(+), 61 deletions(-) diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 185767be30..db4609ca8f 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -657,68 +657,40 @@ pub(crate) fn new_session_info( Some(_) => "~".to_string(), None => config.cwd.display().to_string(), }; + // Discover AGENTS.md files to decide whether to suggest `/init`. + let has_agents_md = discover_project_doc_paths(config) + .map(|v| !v.is_empty()) + .unwrap_or(false); - let lines: Vec> = vec![ - Line::from(vec![ - Span::raw(">_ ").dim(), - Span::styled( - "You are using OpenAI Codex in", - Style::default().add_modifier(Modifier::BOLD), - ), - Span::raw(format!(" {cwd_str}")).dim(), - ]), - Line::from("".dim()), - Line::from(" To get started, describe a task or try one of these commands:".dim()), - Line::from("".dim()), - Line::from(vec![ - Span::styled( - " /init", - Style::default() - .add_modifier(Modifier::BOLD) - .fg(Color::White), - ), - Span::styled( - format!(" - {}", SlashCommand::Init.description()), - Style::default().dim(), - ), - ]), - Line::from(vec![ - Span::styled( - " /status", - Style::default() - .add_modifier(Modifier::BOLD) - .fg(Color::White), - ), - Span::styled( - format!(" - {}", SlashCommand::Status.description()), - Style::default().dim(), - ), - ]), - Line::from(vec![ - Span::styled( - " /approvals", - Style::default() - .add_modifier(Modifier::BOLD) - .fg(Color::White), - ), - Span::styled( - format!(" - {}", SlashCommand::Approvals.description()), - Style::default().dim(), - ), - ]), - Line::from(vec![ - Span::styled( - " /model", - Style::default() - .add_modifier(Modifier::BOLD) - .fg(Color::White), - ), - Span::styled( - format!(" - {}", SlashCommand::Model.description()), - Style::default().dim(), - ), - ]), - ]; + let mut lines: Vec> = Vec::new(); + lines.push(Line::from(vec![ + ">_ ".dim(), + "You are using OpenAI Codex in".bold(), + format!(" {cwd_str}").dim(), + ])); + lines.push(Line::from("".dim())); + lines.push(Line::from( + " To get started, describe a task or try one of these commands:".dim(), + )); + lines.push(Line::from("".dim())); + if !has_agents_md { + lines.push(Line::from(vec![ + " /init".bold(), + format!(" - {}", SlashCommand::Init.description()).dim(), + ])); + } + lines.push(Line::from(vec![ + " /status".bold(), + format!(" - {}", SlashCommand::Status.description()).dim(), + ])); + lines.push(Line::from(vec![ + " /approvals".bold(), + format!(" - {}", SlashCommand::Approvals.description()).dim(), + ])); + lines.push(Line::from(vec![ + " /model".bold(), + format!(" - {}", SlashCommand::Model.description()).dim(), + ])); PlainHistoryCell { lines } } else if config.model == model { PlainHistoryCell { lines: Vec::new() } From 4b426f7e1ee3269504a3ce077bfe9dc1969a89fc Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 2 Sep 2025 12:56:09 -0700 Subject: [PATCH 2/4] fix: leverage windows-11-arm for Windows ARM builds (#3062) This is in support of https://github.com/openai/codex/issues/2979. Once we have a release out, we can update the npm module and the VS Code extension to take advantage of this. --- .github/dotslash-config.json | 4 ++++ .github/workflows/rust-ci.yml | 6 ++++++ .github/workflows/rust-release.yml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/.github/dotslash-config.json b/.github/dotslash-config.json index f3b85b2b4b..8566e03490 100644 --- a/.github/dotslash-config.json +++ b/.github/dotslash-config.json @@ -21,6 +21,10 @@ "windows-x86_64": { "regex": "^codex-x86_64-pc-windows-msvc\\.exe\\.zst$", "path": "codex.exe" + }, + "windows-aarch64": { + "regex": "^codex-aarch64-pc-windows-msvc\\.exe\\.zst$", + "path": "codex.exe" } } } diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 22a9291a5f..875441c536 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -100,6 +100,9 @@ jobs: - runner: windows-latest target: x86_64-pc-windows-msvc profile: dev + - runner: windows-11-arm + target: aarch64-pc-windows-msvc + profile: dev # Also run representative release builds on Mac and Linux because # there could be release-only build errors we want to catch. @@ -114,6 +117,9 @@ jobs: - runner: windows-latest target: x86_64-pc-windows-msvc profile: release + - runner: windows-11-arm + target: aarch64-pc-windows-msvc + profile: release steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index a6d8128a3e..c0fe1b2167 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -72,6 +72,8 @@ jobs: target: aarch64-unknown-linux-gnu - runner: windows-latest target: x86_64-pc-windows-msvc + - runner: windows-11-arm + target: aarch64-pc-windows-msvc steps: - uses: actions/checkout@v5 From 7bcdc5cc7c3d2a8c46f66adec0dce35bd8548ba2 Mon Sep 17 00:00:00 2001 From: Reuben Narad <139025392+ReubenNarad@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:03:11 -0700 Subject: [PATCH 3/4] fix config reference table (#3063) 3 quick fixes to docs/config.md - Fix the reference table so option lists render correctly - Corrected the default `stream_max_retries` to 5 (Old: 10) - Update example approval_policy to untrusted (Old: unless-allow-listed) --- docs/config.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/config.md b/docs/config.md index 7d0bd7d2b8..1d0e8cd741 100644 --- a/docs/config.md +++ b/docs/config.md @@ -116,7 +116,7 @@ How many times Codex will retry a failed HTTP request to the model provider. Def #### stream_max_retries -Number of times Codex will attempt to reconnect when a streaming response is interrupted. Defaults to `10`. +Number of times Codex will attempt to reconnect when a streaming response is interrupted. Defaults to `5`. #### stream_idle_timeout_ms @@ -181,7 +181,7 @@ Here is an example of a `config.toml` that defines multiple profiles: ```toml model = "o3" -approval_policy = "unless-allow-listed" +approval_policy = "untrusted" disable_response_storage = false # Setting `profile` is equivalent to specifying `--profile o3` on the command @@ -572,8 +572,8 @@ Options that are specific to the TUI. | `model_provider` | string | Provider id from `model_providers` (default: `openai`). | | `model_context_window` | number | Context window tokens. | | `model_max_output_tokens` | number | Max output tokens. | -| `approval_policy` | `untrusted` | `on-failure` | `on-request` | `never` | When to prompt for approval. | -| `sandbox_mode` | `read-only` | `workspace-write` | `danger-full-access` | OS sandbox policy. | +| `approval_policy` | `untrusted` \| `on-failure` \| `on-request` \| `never` | When to prompt for approval. | +| `sandbox_mode` | `read-only` \| `workspace-write` \| `danger-full-access` | OS sandbox policy. | | `sandbox_workspace_write.writable_roots` | array | Extra writable roots in workspace‑write. | | `sandbox_workspace_write.network_access` | boolean | Allow network in workspace‑write (default: false). | | `sandbox_workspace_write.exclude_tmpdir_env_var` | boolean | Exclude `$TMPDIR` from writable roots (default: false). | @@ -587,7 +587,7 @@ Options that are specific to the TUI. | `model_providers..name` | string | Display name. | | `model_providers..base_url` | string | API base URL. | | `model_providers..env_key` | string | Env var for API key. | -| `model_providers..wire_api` | `chat` | `responses` | Protocol used (default: `chat`). | +| `model_providers..wire_api` | `chat` \| `responses` | Protocol used (default: `chat`). | | `model_providers..query_params` | map | Extra query params (e.g., Azure `api-version`). | | `model_providers..http_headers` | map | Additional static headers. | | `model_providers..env_http_headers` | map | Headers sourced from env vars. | @@ -597,15 +597,15 @@ Options that are specific to the TUI. | `project_doc_max_bytes` | number | Max bytes to read from `AGENTS.md`. | | `profile` | string | Active profile name. | | `profiles..*` | various | Profile‑scoped overrides of the same keys. | -| `history.persistence` | `save-all` | `none` | History file persistence (default: `save-all`). | +| `history.persistence` | `save-all` \| `none` | History file persistence (default: `save-all`). | | `history.max_bytes` | number | Currently ignored (not enforced). | -| `file_opener` | `vscode` | `vscode-insiders` | `windsurf` | `cursor` | `none` | URI scheme for clickable citations (default: `vscode`). | +| `file_opener` | `vscode` \| `vscode-insiders` \| `windsurf` \| `cursor` \| `none` | URI scheme for clickable citations (default: `vscode`). | | `tui` | table | TUI‑specific options (reserved). | | `hide_agent_reasoning` | boolean | Hide model reasoning events. | | `show_raw_agent_reasoning` | boolean | Show raw reasoning (when available). | -| `model_reasoning_effort` | `minimal` | `low` | `medium` | `high` | Responses API reasoning effort. | -| `model_reasoning_summary` | `auto` | `concise` | `detailed` | `none` | Reasoning summaries. | -| `model_verbosity` | `low` | `medium` | `high` | GPT‑5 text verbosity (Responses API). | +| `model_reasoning_effort` | `minimal` \| `low` \| `medium` \| `high` | Responses API reasoning effort. | +| `model_reasoning_summary` | `auto` \| `concise` \| `detailed` \| `none` | Reasoning summaries. | +| `model_verbosity` | `low` \| `medium` \| `high` | GPT‑5 text verbosity (Responses API). | | `model_supports_reasoning_summaries` | boolean | Force‑enable reasoning summaries. | | `chatgpt_base_url` | string | Base URL for ChatGPT auth flow. | | `experimental_resume` | string (path) | Resume JSONL path (internal/experimental). | @@ -613,5 +613,5 @@ Options that are specific to the TUI. | `experimental_use_exec_command_tool` | boolean | Use experimental exec command tool. | | `responses_originator_header_internal_override` | string | Override `originator` header value. | | `projects..trust_level` | string | Mark project/worktree as trusted (only `"trusted"` is recognized). | -| `preferred_auth_method` | `chatgpt` | `apikey` | Select default auth method (default: `chatgpt`). | +| `preferred_auth_method` | `chatgpt` \| `apikey` | Select default auth method (default: `chatgpt`). | | `tools.web_search` | boolean | Enable web search tool (alias: `web_search_request`) (default: false). | From 1e1c09081ec1561ee8ec73a90356fecb804d3c43 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 2 Sep 2025 14:03:55 -0700 Subject: [PATCH 4/4] fix: install zstd on the windows-11-arm image used to cut a release --- .github/workflows/rust-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index c0fe1b2167..a765ba6a33 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -111,6 +111,11 @@ jobs: cp target/${{ matrix.target }}/release/codex "$dest/codex-${{ matrix.target }}" fi + - if: ${{ matrix.runner == 'windows-11-arm' }} + name: Install zstd + shell: powershell + run: choco install -y zstandard + - name: Compress artifacts shell: bash run: |