Commit Graph
3828 Commits
Author SHA1 Message Date
Charles Cunningham 6e6e718738 Use real user predicate for compaction reinjection 2026-02-17 18:47:38 -08:00
Charles Cunningham 01794f1a46 Reuse compaction keep filter for incoming items 2026-02-17 18:46:04 -08:00
Charles Cunningham 589b0763cc Fix compact test snapshot and include bazel lock update 2026-02-17 18:29:14 -08:00
Charles Cunningham 3964becfde dd comment 2026-02-17 18:29:13 -08:00
Charles Cunningham 15aa101bf6 Qualify Feature enum in compact suite tests 2026-02-17 18:29:13 -08:00
Charles Cunningham a38b1c9cf5 Move compact reinjection snapshots into suite coverage 2026-02-17 18:29:13 -08:00
Charles Cunningham 04b157bb4c Treat no-op pre-turn compaction as not-needed 2026-02-17 18:29:13 -08:00
Charles Cunningham 907e292ad9 Add comment 2026-02-17 18:29:13 -08:00
Charles Cunningham 3f2f817ab6 Make compact unit snapshots Bazel-stable 2026-02-17 18:29:13 -08:00
Charles Cunningham ccc270083f Persist pre-turn updates before interrupted auto-compaction exits 2026-02-17 18:29:13 -08:00
Charles Cunningham f7956ffabc Persist pre-turn updates before interrupted model-switch compact exits 2026-02-17 18:29:13 -08:00
Charles Cunningham d81d89ac0b Silence interrupted pre-turn compaction failures 2026-02-17 18:29:13 -08:00
Charles Cunningham 7139784970 Strip incoming model-switch updates from remote compaction input 2026-02-17 18:29:13 -08:00
Charles Cunningham 9d34abf954 core: snapshot pre-turn model-switch compaction strip behavior 2026-02-17 18:29:13 -08:00
Charles Cunningham b5aeb30d59 compact: strip incoming model-switch before compaction 2026-02-17 18:29:13 -08:00
Charles Cunningham 5929f058b0 compact: snapshot reinjection above last summary 2026-02-17 18:29:13 -08:00
Charles Cunningham 466c689766 compact: reinsert context above last summary 2026-02-17 18:29:12 -08:00
Charles Cunningham b029cc2d01 Reinject context for summary-only compacted history 2026-02-17 18:29:12 -08:00
Charles Cunningham f832de6371 Document manual compact turn-context reinjection policy 2026-02-17 18:29:12 -08:00
Charles Cunningham 3a04f2c689 Use explicit user-message predicate for compaction filtering 2026-02-17 18:29:12 -08:00
Charles Cunningham 54e606ade3 Comment 2026-02-17 18:29:12 -08:00
Charles Cunningham de959aafa2 Comments 2026-02-17 18:29:12 -08:00
Charles Cunningham 8595664092 Move pre-turn auto-compact error handling into helper 2026-02-17 18:29:12 -08:00
Charles Cunningham e3efe3a020 Return sentinel error from model-switch compaction helper 2026-02-17 18:29:12 -08:00
Charles Cunningham 5682f72551 Move previous-model compact failure handling into helper 2026-02-17 18:29:12 -08:00
Charles Cunningham b7b50d6e98 Add TODO for legacy compacted history context reinjection 2026-02-17 18:29:12 -08:00
Charles Cunningham 9e6ef13d4d Add comment 2026-02-17 18:29:12 -08:00
Charles Cunningham ce7777801d Enable compaction tests and remove stale TODO markers 2026-02-17 18:29:12 -08:00
Charles Cunningham d9b02b6a9e Differentiate model-switch compaction failures from oversize input 2026-02-17 18:29:12 -08:00
Charles Cunningham bddd53bae5 Rebase: align compaction snapshots and imports 2026-02-17 18:29:11 -08:00
Charles Cunningham c92190f130 Avoid wildcard pattern in ResponseEvent::Completed match 2026-02-17 18:29:11 -08:00
Charles Cunningham 15730c2fcb Align compaction tests with incoming-item and empty-history behavior 2026-02-17 18:29:11 -08:00
Charles Cunningham 8b2f5066a5 update snaps 2026-02-17 18:29:11 -08:00
Charles Cunningham 2a804d9f4d Update snaps 2026-02-17 18:29:11 -08:00
Charles Cunningham 59d3431a15 Fix clippy useless_vec in compact_remote test 2026-02-17 18:29:11 -08:00
Charles Cunningham 36499b59f0 Reinject canonical context for model-switch pre-turn compaction 2026-02-17 18:29:11 -08:00
Charles Cunningham 8d06dd5f8b Persist pre-turn updates before apps tool-list cancellation 2026-02-17 18:29:11 -08:00
Charles Cunningham e87455e284 codex: persist pre-turn updates when compaction fails 2026-02-17 18:29:11 -08:00
Charles Cunningham 4022de74ef compact: preserve incoming items during pre-turn trim retries 2026-02-17 18:29:11 -08:00
Charles Cunningham e0f99ebaa4 compact: split core logic changes from snapshot test coverage 2026-02-17 18:29:11 -08:00
Charles Cunningham 5c389f9f20 Update pre-sampling model-switch compaction snapshot 2026-02-17 18:29:11 -08:00
Charles Cunningham c7cef7dab1 update snapshot 2026-02-17 18:29:10 -08:00
Charles Cunningham a79bebe5ca Simplify 2026-02-17 18:29:10 -08:00
Charles Cunningham 2d4123c267 Fix model switch compaction 2026-02-17 18:29:10 -08:00
Charley Cunningham eb68767f2f Unify remote compaction snapshot mocks around default endpoint behavior (#12050)
## Summary
- standardize remote compaction test mocking around one default behavior
in shared helpers
- make default remote compact mocks mirror production shape: keep
`message/user` + `message/developer`, drop assistant/tool artifacts,
then append a summary user message
- switch non-special `compact_remote` tests to the shared default mock
instead of ad-hoc JSON payloads

## Special-case tests that still use explicit mocks
- remote compaction error payload / HTTP failure behavior
- summary-only compact output behavior
- manual `/compact` with no prior user messages
- stale developer-instruction injection coverage

## Why
This removes inconsistent manual remote compaction fixtures and gives us
one source of truth for normal remote compact behavior, while preserving
explicit mocks only where tests intentionally cover non-default
behavior.
2026-02-17 18:18:47 -08:00
Owen Lin db4d2599b5 feat(core): plumb distinct approval ids for command approvals (#12051)
zsh fork PR stack:
- https://github.com/openai/codex/pull/12051 👈 
- https://github.com/openai/codex/pull/12052

With upcoming support for a fork of zsh that allows us to intercept
`execve` and run execpolicy checks for each subcommand as part of a
`CommandExecution`, it will be possible for there to be multiple
approval requests for a shell command like `/path/to/zsh -lc 'git status
&& rg \"TODO\" src && make test'`.

To support that, this PR introduces a new `approval_id` field across
core, protocol, and app-server so that we can associate approvals
properly for subcommands.
2026-02-18 01:55:57 +00:00
Shijie Rao b3a8571219 Chore: remove response model check and rely on header model for downgrade (#12061)
### Summary
Ensure that we use the model value from the response header only so that
we are guaranteed with the correct slug name. We are no longer checking
against the model value from response so that we are less likely to have
false positive.

There are two different treatments - for SSE we use the header from the
response and for websocket we check top-level events.
2026-02-18 01:50:06 +00:00
Ruslan Nigmatullin 31cbebd3c2 app-server: Emit thread archive/unarchive notifications (#12030)
* Add v2 server notifications `thread/archived` and `thread/unarchived`
with a `threadId` payload.
* Wire new events into `thread/archive` and `thread/unarchive` success
paths.
* Update app-server protocol/schema/docs accordingly.

Testing:
- Updated archive/unarchive end-to-end tests to verify both
notifications are emitted with the expected thread id payload.
2026-02-17 14:53:58 -08:00
Charley Cunningham 709e2133bb tui: exit session on Ctrl+C in cwd change prompt (#12040)
## Summary
- change the cwd-change prompt (shown when resuming/forking across
different directories) so `Ctrl+C`/`Ctrl+D` exits the session instead of
implicitly selecting "Use session directory"
- introduce explicit prompt and resolver exit outcomes so this intent is
propagated cleanly through both startup resume/fork and in-app `/resume`
flows
- add a unit test that verifies `Ctrl+C` exits rather than selecting an
option

## Why
Previously, pressing `Ctrl+C` on this prompt silently picked one of the
options, which made it hard to abort. This aligns the prompt with the
expected quit behavior.

## Codex author
`codex resume 019c6d39-bbfb-7dc3-8008-1388a054e86d`
2026-02-17 14:48:12 -08:00
iceweasel-oai c4bb7db159 don't fail if an npm publish attempt is for an existing version. (#12044) 2026-02-17 14:20:29 -08:00