Skip to content

fix: Claude CLI conversation state survives resets and leaks old history into new chats#400

Closed
sam-saffron-jarvis wants to merge 1 commit intoSamSaffron:mainfrom
sam-saffron-jarvis:feat/codereview-8a78d550
Closed

fix: Claude CLI conversation state survives resets and leaks old history into new chats#400
sam-saffron-jarvis wants to merge 1 commit intoSamSaffron:mainfrom
sam-saffron-jarvis:feat/codereview-8a78d550

Conversation

@sam-saffron-jarvis
Copy link
Copy Markdown
Contributor

What

Add a ResetConversation() hook to ClaudeBinProvider that clears the persisted Claude CLI resume state (sessionID and messagesSent) so fresh conversations do not reuse the previous Claude session. Also add a regression test covering the reset behavior.

Why

Engine.ResetConversation() already forwards resets to providers that implement a reset hook, but ClaudeBinProvider was not implementing one even though it caches resume state across turns. That let supposedly fresh conversations keep resuming the old Claude CLI session, skip re-sending the full prompt/system instructions, and leak stale context into new chats.

@SamSaffron
Copy link
Copy Markdown
Owner

Closing in favor of consolidated local changeset on branch pr-consolidation. The change from this PR was folded in along with: #387, #389, #390, #391, #400, #401, #402, #403, #404. Build and full test suite pass.

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