Skip to content

fix(chat): prevent model changes from aborting active turns - #280

Merged
heath-s merged 3 commits into
mainfrom
fix/model-effort-abort
Jul 31, 2026
Merged

fix(chat): prevent model changes from aborting active turns#280
heath-s merged 3 commits into
mainfrom
fix/model-effort-abort

Conversation

@heath-s

@heath-s heath-s commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the current provider turn streaming when model, effort, or provider selection changes
  • apply the new selection to subsequent turns without task-wide cleanup during an active turn
  • preserve existing runtime cleanup for idle provider switches
  • add regression coverage for active and idle selection changes

Root cause

The model/effort selector re-selected the task provider on every change. setTaskProvider unconditionally called task-wide provider cleanup, which aborted any active turn even when the provider had not changed.

Validation

  • bun test tests/task-provider-selection.test.ts tests/task-stream-switch-regression.test.ts tests/prompt-draft-runtime.test.ts tests/model-effort-selector-utils.test.ts tests/model-runtime-preferences.test.ts (25 passed)
  • bun run typecheck
  • Prettier check for changed files

@heath-s
heath-s marked this pull request as ready for review July 30, 2026 08:51
@heath-s
heath-s enabled auto-merge (squash) July 30, 2026 08:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b57192156b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/store/app-store-task-lifecycle-actions.ts
@heath-s
heath-s disabled auto-merge July 30, 2026 09:09
@heath-s
heath-s enabled auto-merge (squash) July 30, 2026 09:49
@heath-s
heath-s merged commit c7bb971 into main Jul 31, 2026
4 checks passed
@heath-s
heath-s deleted the fix/model-effort-abort branch July 31, 2026 01:14
@astyfx astyfx mentioned this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants