Commit Graph

5387 Commits

Author SHA1 Message Date
Michael Bolin
684cdf4d2d merge commit for archive created by Sapling 2025-12-05 12:06:32 -08:00
Michael Bolin
eca4502f60 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 12:06:21 -08:00
Michael Bolin
a475d2beea merge commit for archive created by Sapling 2025-12-05 11:07:06 -08:00
Michael Bolin
cce0d19075 fix: exec-server should drop oversized env vars when escalating
When trying to introduce an integration test for the `codex-shell-tool-mcp` in
https://github.com/openai/codex/pull/7617, macOS CI hit serde decode errors in
the escalation pipe when huge env vars inflated the `EscalateRequest` payload
past the stream frame, corrupting JSON. (I'm pretty sure `$GITHUB_EVENT` was the
offending env var.)

This PR updates `exec-server` to filter out oversized env entries and skip
reserved vars before serialization.

It also updates the code to avoid attaching empty `SCM_RIGHTS` control messages
so frames stay lean when no FDs are sent.
2025-12-05 11:06:52 -08:00
Michael Bolin
f1f532d4b8 merge commit for archive created by Sapling 2025-12-05 11:03:38 -08:00
Michael Bolin
e2f0cbfa70 fix: exec-server should drop oversized env vars when escalating
When trying to introduce an integration test for the `codex-shell-tool-mcp` in
https://github.com/openai/codex/pull/7617, macOS CI hit serde decode errors in
the escalation pipe when huge env vars inflated the `EscalateRequest` payload
past the stream frame, corrupting JSON. (I'm pretty sure `$GITHUB_EVENT` was the
offending env var.)

This PR updates `exec-server` to filter out oversized env entries and skip
reserved vars before serialization.

It also updates the code to avoid attaching empty `SCM_RIGHTS` control messages
so frames stay lean when no FDs are sent.
2025-12-05 11:03:14 -08:00
Michael Bolin
2a844f1d26 Merge b54a7c56be into sapling-pr-archive-bolinfest 2025-12-05 10:36:34 -08:00
Michael Bolin
b54a7c56be fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 10:36:20 -08:00
Michael Bolin
18e19a029f merge commit for archive created by Sapling 2025-12-05 09:08:31 -08:00
Michael Bolin
11082c5e26 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:08:25 -08:00
Michael Bolin
09f5d23263 merge commit for archive created by Sapling 2025-12-05 09:05:25 -08:00
Michael Bolin
6429b3fe08 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:05:20 -08:00
Michael Bolin
84ba26fe76 merge commit for archive created by Sapling 2025-12-05 09:01:20 -08:00
Michael Bolin
0905212151 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:01:12 -08:00
Michael Bolin
06025d4298 Merge f4912215c8 into sapling-pr-archive-bolinfest 2025-12-05 08:42:24 -08:00
Michael Bolin
f4912215c8 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 08:42:18 -08:00
jif-oai
e91bb6b947 fix: ignore ghost snapshots in token consumption (#7638) 2025-12-05 13:57:24 +00:00
Michael Bolin
93b17d16fc Merge b39f93ce44 into sapling-pr-archive-bolinfest 2025-12-05 00:52:40 -08:00
Michael Bolin
b39f93ce44 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:52:34 -08:00
Michael Bolin
395f786765 merge commit for archive created by Sapling 2025-12-05 00:49:11 -08:00
Michael Bolin
b0caf2a71d fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:49:04 -08:00
Michael Bolin
3e36a4074c merge commit for archive created by Sapling 2025-12-05 00:26:01 -08:00
Michael Bolin
428bb1759f fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:25:52 -08:00
Michael Bolin
65fba899f9 merge commit for archive created by Sapling 2025-12-05 00:19:24 -08:00
Michael Bolin
ce279a3898 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:19:19 -08:00
Michael Bolin
33ac1b5a12 merge commit for archive created by Sapling 2025-12-05 00:16:55 -08:00
Michael Bolin
28c11b62c9 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:16:35 -08:00
zhao-oai
b8eab7ce90 fix: taking plan type from usage endpoint instead of thru auth token (#7610)
pull plan type from the usage endpoint, persist it in session state /
tui state, and propagate through rate limit snapshots
2025-12-04 23:34:13 -08:00
Michael Bolin
e6ecd926da merge commit for archive created by Sapling 2025-12-04 21:58:49 -08:00
Michael Bolin
ec46022b58 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-04 21:57:32 -08:00
zhao-oai
b1c918d8f7 feat: exec policy integration in shell mcp (#7609)
adding execpolicy support into the `posix` mcp

Co-authored-by: Michael Bolin <mbolin@openai.com>
2025-12-04 21:55:54 -08:00
zhao-oai
4c9762d15c fix typo (#7626) 2025-12-04 21:48:15 -08:00
Michael Bolin
7dd0f92424 merge commit for archive created by Sapling 2025-12-04 21:45:35 -08:00
Michael Bolin
9b9d1e824c fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-04 21:42:59 -08:00
Ahmed Ibrahim
7b359c9c8e Call models endpoint in models manager (#7616)
- Introduce `with_remote_overrides` and update
`refresh_available_models`
- Put `auth_manager` instead of `auth_mode` on `models_manager`
- Remove `ShellType` and `ReasoningLevel` to use already existing
structs
2025-12-04 18:28:03 -08:00
jif-oai
6736d1828d fix: sse for chat (#7594) 2025-12-04 16:46:56 -08:00
Michael Bolin
ab61ee044c merge commit for archive created by Sapling 2025-12-04 16:41:56 -08:00
Michael Bolin
73c4d19093 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-04 16:41:50 -08:00
Michael Bolin
f22273edc4 Merge 8eae62769a into sapling-pr-archive-bolinfest 2025-12-04 16:41:06 -08:00
Michael Bolin
8eae62769a fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-04 16:41:00 -08:00
Michael Bolin
bd7483fbd6 Merge 1eeb5a0549 into sapling-pr-archive-bolinfest 2025-12-04 16:40:50 -08:00
Michael Bolin
1eeb5a0549 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-04 16:40:43 -08:00
Dylan Hurd
073a8533b8 chore(apply-patch) scenarios for e2e testing (#7567)
## Summary
This PR introduces an End to End test suite for apply-patch, so we can
easily validate behavior against other implementations as well.

## Testing
- [x] These are tests
2025-12-05 00:20:54 +00:00
Michael Bolin
0972cd9404 chore: refactor to move Arc<RwLock> concern outside exec_policy_for (#7615)
The caller should decide whether wrapping the policy in `Arc<RwLock>` is
necessary. This should make https://github.com/openai/codex/pull/7609 a
bit smoother.

- `exec_policy_for()` -> `load_exec_policy_for_features()`
- introduce `load_exec_policy()` that does not take `Features` as an arg
- both return `Result<Policy, ExecPolicyError>` instead of
Result<Arc<RwLock<Policy>>, ExecPolicyError>`

This simplifies the tests as they have no need for `Arc<RwLock>`.
2025-12-04 15:13:27 -08:00
Robby He
28dcdb566a Fix handle_shortcut_overlay_key for cross-platform consistency (#7583)
**Summary**
- Shortcut toggle using `?` in `handle_shortcut_overlay_key` fails to
trigger on some platforms (notably Windows). Current match requires
`KeyCode::Char('?')` with `KeyModifiers::NONE`. Some terminals set
`SHIFT` when producing `?` (since it is typically `Shift + /`), so the
strict `NONE` check prevents toggling.

**Impact**
- On Windows consoles/terminals, pressing `?` with an empty composer
often does nothing, leading to inconsistent UX compared to macOS/Linux.

**Root Cause**
- Crossterm/terminal backends report modifiers inconsistently across
platforms. Generating `?` may include `SHIFT`. The code enforces
`modifiers == NONE`, so valid `?` presses with `SHIFT` are ignored.
AltGr keyboards may also surface as `ALT`.

**Repro Steps**
- Open the TUI, ensure the composer is empty.
- Press `?`.
- Expected: Shortcut overlay toggles.
- Actual (Windows frequently): No toggle occurs.

**Fix Options**
- Option 1 (preferred): Accept `?` regardless of `SHIFT`, but reject
`CONTROL` and `ALT`.
- Rationale: Keeps behavior consistent across platforms with minimal
code change.
	- Example change:
		- Before: matching `KeyModifiers::NONE` only.
		- After: allow `SHIFT`, disallow `CONTROL | ALT`.
		- Suggested condition:
			```rust
			let toggles = matches!(key_event.code, KeyCode::Char('?'))
&& !key_event.modifiers.intersects(KeyModifiers::CONTROL |
KeyModifiers::ALT)
					&& self.is_empty();
			```

- Option 2: Platform-specific handling (Windows vs non-Windows).
- Implement two variants or conditional branches using `#[cfg(target_os
= "windows")]`.
- On Windows, accept `?` with `SHIFT`; on other platforms, retain
current behavior.
- Trade-off: Higher maintenance burden and code divergence for limited
benefit.

---

close #5495
2025-12-04 14:56:58 -08:00
Michael Bolin
b8a9b34e82 Merge 6b4e5e6348 into sapling-pr-archive-bolinfest 2025-12-04 14:53:46 -08:00
Michael Bolin
6b4e5e6348 chore: refactor to move Arc<RwLock> concern outside exec_policy_for 2025-12-04 14:53:39 -08:00
Michael Bolin
f1b208ab28 merge commit for archive created by Sapling 2025-12-04 14:47:49 -08:00
Michael Bolin
376e2ff881 chore: refactor to move Arc<RwLock> concern outside exec_policy_for 2025-12-04 14:47:45 -08:00
Michael Bolin
5ce0d754de merge commit for archive created by Sapling 2025-12-04 14:44:21 -08:00