Skip to content

fix: settle context compaction after provider stops - #573

Merged
wibus-wee merged 6 commits into
mainfrom
fix/context-compaction-terminal-state
Sep 10, 2026
Merged

fix: settle context compaction after provider stops#573
wibus-wee merged 6 commits into
mainfrom
fix/context-compaction-terminal-state

Conversation

@wibus-wee

@wibus-wee wibus-wee commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

  • settle unresolved context-compaction activity when a started provider prompt returns an error and is no longer in flight, without depending on ACP numeric codes or error-message allowlists
  • keep cancelled compaction active while fix(cli): retain ACP prompt ownership after cancellation #571 retains provider ownership; after raw ACP completion or successful termination, persist the terminal state before releasing the execution owner
  • keep waiting after failed termination, preserve explicit provider terminal states, and allow a later completed update for the same toolCallId
  • add deterministic coverage for the exact [Bug] Context compaction indicator remains active after a failed compact request #570 transport error and for raw resolve/reject, termination success, termination failure, reload, late completion, and the next turn

Fixes #570
Fixes #267

Completes the context-compaction state convergence needed by #267 after #571 fixed provider ownership.

Testing

  • pnpm check (Node 22.23.2)
  • pnpm format
  • pnpm run docs check
  • related CLI suites: 118 tests passed

No local E2E or Model API Simulator run was added.

Treat unresolved context compaction activity as failed once its owning
assistant turn finishes, so both transcript and usage footer stop spinning.

Model: gpt-5.6-sol
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T12:45:35.326395Z e0a0357 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Record the implementation PR in both Agent Note translations.

Model: gpt-5.6-sol
Add lifecycle regression coverage across finalization, persisted history reload, late completion, and a subsequent compaction turn.

Model: gpt-5.6-sol
Persist failed compaction state only when the ACP prompt returns an error or the provider disconnects. Keep interrupted turns active until provider state converges.

Model: gpt-5.6-sol
@wibus-wee wibus-wee changed the title fix: stop stale context compaction indicators fix: settle context compaction after provider failure Sep 10, 2026
@wibus-wee wibus-wee changed the title fix: settle context compaction after provider failure fix: settle context compaction after provider stops Sep 10, 2026
@wibus-wee
wibus-wee merged commit 235329a into main Sep 10, 2026
8 checks passed
@wibus-wee
wibus-wee deleted the fix/context-compaction-terminal-state branch September 10, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Context compaction indicator remains active after a failed compact request [Bug] 压缩上下文终端后卡死

1 participant