easong-openai
09819d9b47
Add the ability to interrupt and provide feedback to the model ( #2381 )
2025-08-22 20:34:43 -07:00
Michael Bolin
e3b03eaccb
feat: StreamableShell with exec_command and write_stdin tools ( #2574 )
2025-08-22 18:10:55 -07:00
Michael Bolin
5fa0eed07d
merge commit for archive created by Sapling
2025-08-22 17:14:39 -07:00
Michael Bolin
3b1044519c
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 17:14:34 -07:00
Ahmed Ibrahim
311ad0ce26
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
Michael Bolin
92b3aa16f1
merge commit for archive created by Sapling
2025-08-22 17:05:50 -07:00
Michael Bolin
1e89c8208b
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 17:05:45 -07:00
Jeremy Rose
5fa7d46ddf
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
d994019f3f
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
6de9541f0a
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
85099017fd
Fix typo in AGENTS.md ( #2518 )
...
- Change `examole` to `example`
2025-08-22 16:05:39 -07:00
dependabot[bot]
a5b2ebb49b
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] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 15:57:33 -07:00
Gabriel Peal
697c7cf4bf
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
dependabot[bot]
34ac698bef
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] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 15:45:14 -07:00
Ahmed Ibrahim
097782c775
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
345667d4b1
merge commit for archive created by Sapling
2025-08-22 14:26:54 -07:00
Michael Bolin
3b7acc34cf
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 14:26:49 -07:00
Michael Bolin
8ba8089592
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
57c498159a
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
bbf42f4e12
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
Michael Bolin
073dfe7044
merge commit for archive created by Sapling
2025-08-22 13:54:52 -07:00
Dylan
6f0b499594
[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
Michael Bolin
fcfcf1330b
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 13:54:44 -07:00
Michael Bolin
9385491c71
merge commit for archive created by Sapling
2025-08-22 13:47:57 -07:00
Michael Bolin
27b6669245
fix: prefer sending MCP structuredContent as the function call response, if available
2025-08-22 13:47:51 -07:00
Dylan
236c4f76a6
[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
Michael Bolin
0cf7dec673
Merge 8f4192e63a into sapling-pr-archive-bolinfest
2025-08-22 13:37:01 -07:00
Michael Bolin
8f4192e63a
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 13:36:53 -07:00
Michael Bolin
2097af842f
merge commit for archive created by Sapling
2025-08-22 13:34:35 -07:00
Michael Bolin
14d515700b
fix: prefer sending MCP structuredContent as the function call response, if available
2025-08-22 13:34:29 -07:00
Michael Bolin
0b4c450b7c
merge commit for archive created by Sapling
2025-08-22 13:33:42 -07:00
Michael Bolin
2786e364b3
fix: prefer sending MCP structuredContent as the function call response, if available
2025-08-22 13:33:30 -07:00
Michael Bolin
315cbc1063
Merge 81adcb1482 into sapling-pr-archive-bolinfest
2025-08-22 13:16:48 -07:00
Michael Bolin
81adcb1482
fix: prefer sending MCP structuredContent as the function call response, if available
2025-08-22 13:16:42 -07:00
Eric Traut
dc42ec0eb4
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
cdc77c10fb
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
c5d21a4564
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/72504f1d9c6eb17086d86ef1fb0d17676812461b .
@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 <easong@openai.com >
Co-authored-by: Daniel Edrisian <dedrisian@openai.com >
Co-authored-by: Michael Bolin <mbolin@openai.com >
2025-08-22 17:05:43 +00:00
Jeremy Rose
59f6b1654f
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
80b00a193e
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
76dc3f6054
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
Michael Bolin
9fd4b57aa4
merge commit for archive created by Sapling
2025-08-22 00:58:48 -07:00
Michael Bolin
c279878370
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 00:58:42 -07:00
Michael Bolin
c3a4c26ffc
merge commit for archive created by Sapling
2025-08-22 00:43:11 -07:00
Michael Bolin
a906dca3d1
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 00:43:06 -07:00
Michael Bolin
45321ef397
merge commit for archive created by Sapling
2025-08-22 00:35:08 -07:00
Michael Bolin
e502e00b80
feat: StreamableShell with exec_command and write_stdin tools
2025-08-22 00:34:17 -07:00
Michael Bolin
7517efe3d3
merge commit for archive created by Sapling
2025-08-21 22:38:20 -07:00
Michael Bolin
bf08f87094
feat: StreamableShell with exec_command and write_stdin tools
2025-08-21 22:38:14 -07:00
Michael Bolin
b4376509b4
merge commit for archive created by Sapling
2025-08-21 22:37:15 -07:00
Michael Bolin
f7cdaaa246
feat: StreamableShell with exec_command and write_stdin tools
2025-08-21 22:37:05 -07:00