James Peter
9a3b7e55bc
Merge remote-tracking branch 'upstream/main' into merge/upstream-main-2025-08-24
2025-08-24 05:56:25 +10:00
James Peter
8ed0236237
chore: commit all pending changes
2025-08-24 05:52:24 +10:00
a4a2ba7983
send-aggregated output ( #2364 )
...
We want to send an aggregated output of stderr and stdout so we don't
have to aggregate it stderr+stdout as we lose order sometimes.
---------
Co-authored-by: Gabriel Peal <[email protected] >
2025-08-23 16:54:31 +00:00
James Peter
b62fa2be65
fix(tui): fully paint cell areas and margins\n\n- Wrap HistoryCell Paragraphs in bg-styled Block to fill width\n- ExecCell: bg on pre/output blocks and borders\n- Gutter symbols + scrollbar track/thumb include bg\n\nEliminates rare right-margin artifacts and ensures consistent background under fast scroll.
2025-08-24 01:14:49 +10:00
James Peter
05e07fe138
fix(tui): clear full history region (incl. padding) each frame to eliminate rare margin artifacts and ensure background is fully painted
2025-08-24 00:57:37 +10:00
James Peter
cd5c691eee
chore: commit all pending changes
2025-08-23 19:23:58 +10:00
James Peter
b1a6f88e19
merge(tui): clear chat content rect each frame to prevent stale glyphs
2025-08-23 18:57:32 +10:00
James Peter
1b8c400cfc
fix(tui): clear chat content area to prevent stuck characters when scrolling
...
- Clear content_area with spaces before rendering cells each frame
- Preserves theme background color while clearing
- Minimal performance impact (only clears chat viewport, not full terminal)
- Fixes artifacts that remained when scrolling to shorter lines
2025-08-23 18:33:23 +10:00
James Peter
984243082a
tui: call insert_history_lines via module with terminal ref (fix E0423)
2025-08-23 18:28:09 +10:00
James Peter
b71f6e80e8
release: regenerate Cargo.lock in CI before locked build to include target-specific deps
2025-08-23 18:22:01 +10:00
James Peter
d903f26c28
Merge origin/main into local main
2025-08-23 18:14:04 +10:00
James Peter
59a4de3e01
Merge merge/upstream-2025-08-23-110428 into main
2025-08-23 18:13:52 +10:00
James Peter
1197abebcc
Merge upstream/main; align protocol/core; revert TUI to fork and adapt; fix build
2025-08-23 18:13:52 +10:00
easong-openai and GitHub
e560cfd4cb
transcript hint ( #2605 )
...
Adds a hint to use ctrl-t to view transcript for more details
<img width="475" height="49" alt="image"
src="https://github.com/user-attachments/assets/6ff650eb-ed54-4699-be04-3c50f0f8f631 "
/>
2025-08-23 01:06:22 -07:00
James Peter and GitHub
82ff6bf744
Merge pull request #5 from just-every/copilot/fix-52903477-1f5d-4e00-9da1-58ebb94c8000
...
Fix release.yml workflow awk syntax error and Cargo.lock update logic
2025-08-23 13:44:25 +10:00
copilot-swe-agent[bot] and zemaj
9c63184575
Simplify release.yml to use bash consistently like rust-release.yml
...
Co-authored-by: zemaj <[email protected] >
2025-08-23 03:41:23 +00:00
copilot-swe-agent[bot] and zemaj
971e5a6bd8
Fix release.yml awk syntax error and Cargo.lock update logic
...
Co-authored-by: zemaj <[email protected] >
2025-08-23 03:39:38 +00:00
easong-openai and GitHub
05b5b30cf4
Add the ability to interrupt and provide feedback to the model ( #2381 )
2025-08-22 20:34:43 -07:00
copilot-swe-agent[bot]
4f6634f816
Initial plan
2025-08-23 03:24:16 +00:00
James Peter and GitHub
74fb61cc09
Merge pull request #4 from just-every/copilot/fix-58e5703e-a4a8-45cd-91a7-2ac0f0331f2b
...
Fix release workflow failing due to incorrect working directory
2025-08-23 13:18:09 +10:00
copilot-swe-agent[bot] and zemaj
eaa2d25fb4
Clean up accidentally committed backup file
...
Co-authored-by: zemaj <[email protected] >
2025-08-23 03:14:16 +00:00
copilot-swe-agent[bot] and zemaj
ebdc8e427b
Remove duplicate Cargo.lock normalization step in release workflow
...
Co-authored-by: zemaj <[email protected] >
2025-08-23 03:11:57 +00:00
copilot-swe-agent[bot] and zemaj
45b0940d62
Fix working directory in release workflow normalize step
...
Co-authored-by: zemaj <[email protected] >
2025-08-23 03:10:05 +00:00
copilot-swe-agent[bot]
e6b2d25b4d
Initial plan
2025-08-23 03:00:52 +00:00
Michael Bolin and GitHub
75650b9853
feat: StreamableShell with exec_command and write_stdin tools ( #2574 )
2025-08-22 18:10:55 -07:00
James Peter
53cab204c4
ci(rust-release): robust core count detection without nproc error noise
2025-08-23 11:01:34 +10:00
James Peter
1c8a67968c
ci(release): fix --locked build by rewriting Cargo.lock workspace package versions without floating deps; improve core count detection
2025-08-23 11:01:13 +10:00
James Peter
34c82228c5
ci: remove Bash mapfile usage for macOS portability; escape PowerShell backticks; align both release workflows
2025-08-23 10:54:46 +10:00
James Peter
1101f4aa11
ci(release): escape PowerShell backtick in Bash string to fix EOF error during version bump on Windows
2025-08-23 10:48:02 +10:00
James Peter
3e84de763c
ci: pin rust toolchain 1.89.0 and enforce --locked; avoid floating lockfile updates in release workflows
2025-08-23 10:43:08 +10:00
Ahmed Ibrahim and GitHub
92abb1b2ae
fork conversation from a previous message ( #2575 )
...
This can be the underlying logic in order to start a conversation from a
previous message. will need some love in the UI.
Base for building this: #2588
2025-08-22 17:06:09 -07:00
Jeremy Rose and GitHub
fda8c74749
tui: fix resize on wezterm ( #2600 )
...
WezTerm doesn't respond to cursor queries during a synchronized update,
so resizing was broken there.
2025-08-22 16:33:18 -07:00
Jeremy Rose and GitHub
df8584e59f
tui: coalesce command output; show unabridged commands in transcript ( #2590 )
...
https://github.com/user-attachments/assets/effec7c7-732a-4b61-a2ae-3cb297b6b19b
2025-08-22 16:32:31 -07:00
Jeremy Rose and GitHub
4091235fe2
tui: open transcript mode at the bottom ( #2592 )
...
this got lost when we switched /diff to use the pager.
2025-08-22 16:06:41 -07:00
wkrettek and GitHub
5df4e99bfa
Fix typo in AGENTS.md ( #2518 )
...
- Change `examole` to `example`
2025-08-22 16:05:39 -07:00
5a2383568e
chore(deps): bump reqwest from 0.12.22 to 0.12.23 in /codex-rs ( #2492 )
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.12.22 to
0.12.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/seanmonstar/reqwest/releases ">reqwest's
releases</a>.</em></p>
<blockquote>
<h2>v0.12.23</h2>
<h2>tl;dr</h2>
<ul>
<li>🇺🇩🇸 Add <code>ClientBuilder::unix_socket(path)</code> option that
will force all requests over that Unix Domain Socket.</li>
<li>🔁 Add <code>ClientBuilder::retries(policy)</code> and
<code>reqwest::retry::Builder</code> to configure <a
href="https://seanmonstar.com/blog/reqwest-retries/ ">automatic
retries</a>.</li>
<li>Add <code>ClientBuilder::dns_resolver2()</code> with more ergonomic
argument bounds, allowing more resolver implementations.</li>
<li>Add <code>http3_*</code> options to
<code>blocking::ClientBuilder</code>.</li>
<li>Fix default TCP timeout values to enabled and faster.</li>
<li>Fix SOCKS proxies to default to port 1080</li>
<li>(wasm) Add cache methods to <code>RequestBuilder</code>.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Minimize package size by <a
href="https://github.com/weiznich "><code>@weiznich</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2759 ">seanmonstar/reqwest#2759</a></li>
<li>chore(dev-dependencies): bump brotli by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2760 ">seanmonstar/reqwest#2760</a></li>
<li>upgrade hickory-dns to 0.25 by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2761 ">seanmonstar/reqwest#2761</a></li>
<li>Re-expose http3 options in blocking::clientBuilder by <a
href="https://github.com/ducaale "><code>@ducaale</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2770 ">seanmonstar/reqwest#2770</a></li>
<li>fix(proxy): restore default port 1080 for SOCKS proxies without
explicit port by <a
href="https://github.com/0x676e67 "><code>@0x676e67</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2771 ">seanmonstar/reqwest#2771</a></li>
<li>ci: use msrv-aware cargo in msrv job by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2779 ">seanmonstar/reqwest#2779</a></li>
<li>feat: add request cache option for wasm by <a
href="https://github.com/Spxg "><code>@Spxg</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2775 ">seanmonstar/reqwest#2775</a></li>
<li>style(client): use <code>std::task::ready!</code> macro to simplify
<code>Poll</code> branch match by <a
href="https://github.com/0x676e67 "><code>@0x676e67</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2781 ">seanmonstar/reqwest#2781</a></li>
<li>fix: add default tcp keepalive and user_timeout values by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2780 ">seanmonstar/reqwest#2780</a></li>
<li>feat: add unix_socket() option to client builder by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2624 ">seanmonstar/reqwest#2624</a></li>
<li>Add retry policies by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2763 ">seanmonstar/reqwest#2763</a></li>
<li>refactor: loosen retry <code>for_host</code> parameter bounds by <a
href="https://github.com/Enduriel "><code>@Enduriel</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2792 ">seanmonstar/reqwest#2792</a></li>
<li>feat: add dns_resolver2 that is more ergonomic and flexible by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2793 ">seanmonstar/reqwest#2793</a></li>
<li>Prepare v0.12.23 by <a
href="https://github.com/seanmonstar "><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2795 ">seanmonstar/reqwest#2795</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/weiznich "><code>@weiznich</code></a>
made their first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2759 ">seanmonstar/reqwest#2759</a></li>
<li><a href="https://github.com/Spxg "><code>@Spxg</code></a> made their
first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2775 ">seanmonstar/reqwest#2775</a></li>
<li><a href="https://github.com/Enduriel "><code>@Enduriel</code></a>
made their first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2792 ">seanmonstar/reqwest#2792</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/seanmonstar/reqwest/compare/v0.12.22...v0.12.23 ">https://github.com/seanmonstar/reqwest/compare/v0.12.22...v0.12.23 </a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md ">reqwest's
changelog</a>.</em></p>
<blockquote>
<h2>v0.12.23</h2>
<ul>
<li>Add <code>ClientBuilder::unix_socket(path)</code> option that will
force all requests over that Unix Domain Socket.</li>
<li>Add <code>ClientBuilder::retries(policy)</code> and
<code>reqwest::retry::Builder</code> to configure automatic
retries.</li>
<li>Add <code>ClientBuilder::dns_resolver2()</code> with more ergonomic
argument bounds, allowing more resolver implementations.</li>
<li>Add <code>http3_*</code> options to
<code>blocking::ClientBuilder</code>.</li>
<li>Fix default TCP timeout values to enabled and faster.</li>
<li>Fix SOCKS proxies to default to port 1080</li>
<li>(wasm) Add cache methods to <code>RequestBuilder</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/ae7375b547495ccae67c0481d36fbe9a166ca12c "><code>ae7375b</code></a>
v0.12.23</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/9aacdc1e2b7d45c3022a42b0d6eb2e8b7000085f "><code>9aacdc1</code></a>
feat: add dns_resolver2 that is more ergonomic and flexible (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2793 ">#2793</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/221be11bc6869cdc6cfe125a3fb90fd2a3d211ab "><code>221be11</code></a>
refactor: loosen retry <code>for_host</code> parameter bounds (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2792 ">#2792</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/acd1b059949a6760997fc486080a5ec54bb7172b "><code>acd1b05</code></a>
feat: add reqwest::retry policies (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2763 ">#2763</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/54b6022b0f12917ce7f4c71e38b0925dc9661e21 "><code>54b6022</code></a>
feat: add <code>ClientBuilder::unix_socket()</code> option (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2624 ">#2624</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/6358cefd24ea4ea387787617f79815d859d8b6e5 "><code>6358cef</code></a>
fix: add default tcp keepalive and user_timeout values (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2780 ">#2780</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/21226a5bc3059a378b95267f2d743fbea44d4c3e "><code>21226a5</code></a>
style(client): use <code>std::task::ready!</code> macro to simplify Poll
branch matching...</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/82086e796b53da6625f1de39ce2d2cf29fcc50e8 "><code>82086e7</code></a>
feat: add request cache options for wasm (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2775 ">#2775</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/2a0f7a367004c900a816679fbf50e499c979ad9e "><code>2a0f7a3</code></a>
ci: use msrv-aware cargo in msrv job (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2779 ">#2779</a>)</li>
<li><a
href="https://github.com/seanmonstar/reqwest/commit/f1868036caea40079b389b0423bb9e7db6ecdad1 "><code>f186803</code></a>
fix(proxy): restore default port 1080 for SOCKS proxies without explicit
port...</li>
<li>Additional commits viewable in <a
href="https://github.com/seanmonstar/reqwest/compare/v0.12.22...v0.12.23 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 15:57:33 -07:00
Gabriel Peal and GitHub
fa31626c8a
Fix flakiness in shell command approval test ( #2547 )
...
## Summary
- read the shell exec approval request's actual id instead of assuming
it is always 0
- use that id when validating and responding in the test
## Testing
- `cargo test -p codex-mcp-server
test_shell_command_approval_triggers_elicitation`
------
https://chatgpt.com/codex/tasks/task_i_68a6ab9c732c832c81522cbf11812be0
2025-08-22 18:46:35 -04:00
106c854319
chore(deps): bump serde_json from 1.0.142 to 1.0.143 in /codex-rs ( #2498 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.142 to
1.0.143.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases ">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.143</h2>
<ul>
<li>Implement Clone and Debug for serde_json::Map iterators (<a
href="https://redirect.github.com/serde-rs/json/issues/1264 ">#1264</a>,
thanks <a
href="https://github.com/xlambein "><code>@xlambein</code></a>)</li>
<li>Implement Default for CompactFormatter (<a
href="https://redirect.github.com/serde-rs/json/issues/1268 ">#1268</a>,
thanks <a href="https://github.com/SOF3 "><code>@SOF3</code></a>)</li>
<li>Implement FromStr for serde_json::Map (<a
href="https://redirect.github.com/serde-rs/json/issues/1271 ">#1271</a>,
thanks <a
href="https://github.com/mickvangelderen "><code>@mickvangelderen</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/serde-rs/json/commit/10102c49bfd95e5b8d42a6c0b9530b1732a6fea8 "><code>10102c4</code></a>
Release 1.0.143</li>
<li><a
href="https://github.com/serde-rs/json/commit/2a5b85312c2eb0eec19f922993e1a6931535b5e3 "><code>2a5b853</code></a>
Replace super::super with absolute path within crate</li>
<li><a
href="https://github.com/serde-rs/json/commit/447170bd38099bc9636de4ff73c00e9d816a75f4 "><code>447170b</code></a>
Merge pull request 1271 from
mickvangelderen/mick/impl-from-str-for-map</li>
<li><a
href="https://github.com/serde-rs/json/commit/ec190d6dfd4ecc5b31db76a7f1c26c54e99eee9f "><code>ec190d6</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1264 ">#1264</a>
from xlambein/master</li>
<li><a
href="https://github.com/serde-rs/json/commit/8be664752fe8b8fc92b239155979fad39719c2fd "><code>8be6647</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1268 ">#1268</a>
from SOF3/compact-default</li>
<li><a
href="https://github.com/serde-rs/json/commit/ba5b3cccea799018d236c1af24a34ae53b6c84cc "><code>ba5b3cc</code></a>
Revert "Pin nightly toolchain used for miri job"</li>
<li><a
href="https://github.com/serde-rs/json/commit/fd35a02901648230ac04657a12b85f5c90fb9106 "><code>fd35a02</code></a>
Implement FromStr for Map<String, Value></li>
<li><a
href="https://github.com/serde-rs/json/commit/bea0fe6b3e1d06dcd46a38be42f775f22f6c2b8e "><code>bea0fe6</code></a>
Implement Default for CompactFormatter</li>
<li><a
href="https://github.com/serde-rs/json/commit/0c0e9f6bfad856db30f389496d64ac2577d8c13b "><code>0c0e9f6</code></a>
Add Clone and Debug impls to map iterators</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.142...v1.0.143 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 15:45:14 -07:00
Ahmed Ibrahim and GitHub
b511e7a529
Move models.rs to protocol ( #2595 )
...
Moving models.rs to protocol so we can use them in `Codex` operations
2025-08-22 22:18:54 +00:00
Michael Bolin and GitHub
9a99bddd7e
fix: prefer sending MCP structuredContent as the function call response, if available ( #2594 )
...
Prior to this change, when we got a `CallToolResult` from an MCP server,
we JSON-serialized its `content` field as the `content` to send back to
the model as part of the function call output that we send back to the
model. This meant that we were dropping the `structuredContent` on the
floor.
Though reading
https://modelcontextprotocol.io/specification/2025-06-18/schema#tool , it
appears that if `outputSchema` is specified, then `structuredContent`
should be set, which seems to be a "higher-fidelity" response to the
function call. This PR updates our handling of `CallToolResult` to
prefer using the JSON-serialization of `structuredContent`, if present,
using `content` as a fallback.
Also, it appears that the sense of `success` was inverted prior to this
PR!
2025-08-22 14:10:18 -07:00
Jeremy Rose and GitHub
aab22c9b68
test: simplify tests in config.rs ( #2586 )
...
this is much easier to read, thanks @bolinfest for the suggestion.
2025-08-22 14:04:21 -07:00
Jeremy Rose and GitHub
e23ed58260
improve performance of 'cargo test -p codex-tui' ( #2593 )
...
before:
```
$ time cargo test -p codex-tui -q
[...]
cargo test -p codex-tui -q 39.89s user 10.77s system 98% cpu 51.328 total
```
after:
```
$ time cargo test -p codex-tui -q
[...]
cargo test -p codex-tui -q 1.37s user 0.64s system 29% cpu 6.699 total
```
the major offenders were the textarea fuzz test and the custom_terminal
doctests. (i think the doctests were being recompiled every time which
made them extra slow?)
2025-08-22 14:03:58 -07:00
Dylan and GitHub
b7f081e847
[config] Detect git worktrees for project trust ( #2585 )
...
## Summary
When resolving our current directory as a project, we want to be a
little bit more clever:
1. If we're in a sub-directory of a git repo, resolve our project
against the root of the git repo
2. If we're in a git worktree, resolve the project against the root of
the git repo
## Testing
- [x] Added unit tests
- [x] Confirmed locally with a git worktree (the one i was using for
this feature)
2025-08-22 13:54:51 -07:00
Dylan and GitHub
745cd059e7
[apply_patch] freeform apply_patch tool ( #2576 )
...
## Summary
GPT-5 introduced the concept of [custom
tools](https://platform.openai.com/docs/guides/function-calling#custom-tools ),
which allow the model to send a raw string result back, simplifying
json-escape issues. We are migrating gpt-5 to use this by default.
However, gpt-oss models do not support custom tools, only normal
functions. So we keep both tool definitions, and provide whichever one
the model family supports.
## Testing
- [x] Tested locally with various models
- [x] Unit tests pass
2025-08-22 13:42:34 -07:00
Eric Traut and GitHub
ec5af0d485
Add AuthManager and enhance GetAuthStatus command ( #2577 )
...
This PR adds a central `AuthManager` struct that manages the auth
information used across conversations and the MCP server. Prior to this,
each conversation and the MCP server got their own private snapshots of
the auth information, and changes to one (such as a logout or token
refresh) were not seen by others.
This is especially problematic when multiple instances of the CLI are
run. For example, consider the case where you start CLI 1 and log in to
ChatGPT account X and then start CLI 2 and log out and then log in to
ChatGPT account Y. The conversation in CLI 1 is still using account X,
but if you create a new conversation, it will suddenly (and
unexpectedly) switch to account Y.
With the `AuthManager`, auth information is read from disk at the time
the `ConversationManager` is constructed, and it is cached in memory.
All new conversations use this same auth information, as do any token
refreshes.
The `AuthManager` is also used by the MCP server's GetAuthStatus
command, which now returns the auth method currently used by the MCP
server.
This PR also includes an enhancement to the GetAuthStatus command. It
now accepts two new (optional) input parameters: `include_token` and
`refresh_token`. Callers can use this to request the in-use auth token
and can optionally request to refresh the token.
The PR also adds tests for the login and auth APIs that I recently added
to the MCP server.
2025-08-22 13:10:11 -07:00
Ahmed Ibrahim and GitHub
fbbfa32355
Fix/tui windows multiline paste ( #2544 )
...
Introduce a minimal paste-burst heuristic in the chat composer so Enter
is treated as a newline during paste-like bursts (plain chars arriving
in very short intervals), avoiding premature submit after the first line
on Windows consoles that lack bracketed paste.
- Detect tight sequences of plain Char events; open a short window where
Enter inserts a newline instead of submitting.
- Extend the window on newline to handle blank lines in pasted content.
- No behavior change for terminals that already emit Event::Paste; no
OS/env toggles added.
2025-08-22 12:23:58 -07:00
acd5ac911c
ctrl+v image + @file accepts images ( #1695 )
...
allow ctrl+v in TUI for images + @file that are images are appended as
raw files (and read by the model) rather than pasted as a path that
cannot be read by the model.
Re-used components and same interface we're using for copying pasted
content in
https://github.com/openai/codex/commit/0d0dd6335ff305af57c823883eef70c8d400f0f9 .
@aibrahim-oai as you've implemented this, mind having a look at this
one?
https://github.com/user-attachments/assets/c6c1153b-6b32-4558-b9a2-f8c57d2be710
---------
Co-authored-by: easong-openai <[email protected] >
Co-authored-by: Daniel Edrisian <[email protected] >
Co-authored-by: Michael Bolin <[email protected] >
2025-08-22 17:05:43 +00:00
Jeremy Rose and GitHub
2f74435432
improve suspend behavior ( #2569 )
...
This is a somewhat roundabout way to fix the issue that pressing ^Z
would put the shell prompt in the wrong place (overwriting some of the
status area below the composer). While I'm at it, clean up the suspend
logic and fix some suspend-while-in-alt-screen behavior too.
2025-08-22 09:41:15 -07:00
vjain419 and GitHub
de9c65fb31
feat(gpt5): add model_verbosity for GPT‑5 via Responses API ( #2108 )
...
**Summary**
- Adds `model_verbosity` config (values: low, medium, high).
- Sends `text.verbosity` only for GPT‑5 family models via the Responses
API.
- Updates docs and adds serialization tests.
**Motivation**
- GPT‑5 introduces a verbosity control to steer output length/detail
without pro
mpt surgery.
- Exposing it as a config knob keeps prompts stable and makes behavior
explicit
and repeatable.
**Changes**
- Config:
- Added `Verbosity` enum (low|medium|high).
- Added optional `model_verbosity` to `ConfigToml`, `Config`, and
`ConfigProfi
le`.
- Request wiring:
- Extended `ResponsesApiRequest` with optional `text` object.
- Populates `text.verbosity` only when model family is `gpt-5`; omitted
otherw
ise.
- Tests:
- Verifies `text.verbosity` serializes when set and is omitted when not
set.
- Docs:
- Added “GPT‑5 Verbosity” section in `codex-rs/README.md`.
- Added `model_verbosity` section to `codex-rs/config.md`.
**Usage**
- In `~/.codex/config.toml`:
- `model = "gpt-5"`
- `model_verbosity = "low"` (or `"medium"` default, `"high"`)
- CLI override example:
- `codex -c model="gpt-5" -c model_verbosity="high"`
**API Impact**
- Requests to GPT‑5 via Responses API include: `text: { verbosity:
"low|medium|h
igh" }` when configured.
- For legacy models or Chat Completions providers, `text` is omitted.
**Backward Compatibility**
- Default behavior unchanged when `model_verbosity` is not set (server
default “
medium”).
**Testing**
- Added unit tests for serialization/omission of `text.verbosity`.
- Ran `cargo fmt` and `cargo test --all-features` (all green).
**Docs**
- `README.md`: new “GPT‑5 Verbosity” note under Config with example.
- `config.md`: new `model_verbosity` section.
**Out of Scope**
- No changes to temperature/top_p or other GPT‑5 parameters.
- No changes to Chat Completions wiring.
**Risks / Notes**
- If OpenAI changes the wire shape for verbosity, we may need to update
`Respons
esApiRequest`.
- Behavior gated to `gpt-5` model family to avoid unexpected effects
elsewhere.
**Checklist**
- [x] Code gated to GPT‑5 family only
- [x] Docs updated (`README.md`, `config.md`)
- [x] Tests added and passing
- [x] Formatting applied
Release note: Add `model_verbosity` config to control GPT‑5 output verbosity via the Responses API (low|medium|high).
2025-08-22 09:12:10 -07:00
Jeremy Rose and GitHub
cbf2d7ef87
show diff output in the pager ( #2568 )
...
this shows `/diff` output in an overlay like the transcript, instead of
dumping it into history.
https://github.com/user-attachments/assets/48e79b65-7f66-45dd-97b3-d5c627ac7349
2025-08-22 08:24:13 -07:00