Skip to content

TUI: preserve permission state after side conversations#18924

Merged
etraut-openai merged 1 commit intomainfrom
etraut/fix-side-permission-restore
Apr 23, 2026
Merged

TUI: preserve permission state after side conversations#18924
etraut-openai merged 1 commit intomainfrom
etraut/fix-side-permission-restore

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 22, 2026

Addresses #18854

Why

The /permissions selector updates the active TUI session state, but the cached session snapshot used when replaying a thread could still contain the old approval or sandbox settings. After opening and leaving /side, the main thread replay could restore those stale settings into the ChatWidget, so the UI and the next submitted turn could fall back to the old permission mode.

What

  • Sync the active thread's cached ThreadSessionState whenever approval policy, sandbox policy, or approval reviewer changes.

Verification

Confirmed bug prior to fix and correct behavior after fix.

Update the active thread's cached session permissions when TUI permission settings change so replaying the main thread after /side doesn't restore stale permission state.

Add coverage that the active thread snapshot is updated without rewriting side-thread state.
@etraut-openai etraut-openai marked this pull request as ready for review April 22, 2026 01:41
@etraut-openai etraut-openai merged commit 08b5e96 into main Apr 23, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-side-permission-restore branch April 23, 2026 05:40
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants