fix(mcp): keep conversation_id across later user messages - #981
Merged
Merged
Conversation
The conversation_id description said to echo the server's previous response. ChatGPT read that as scoped to one message's tool calls and omitted the handle on the first call of each new message, so every message started a new session. The description now says to keep passing the same value for the rest of the conversation, and to pass it unchanged rather than "echo" it. The text matches the TypeScript SDK. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
posthog-python Compliance ReportDate: 2026-09-25T14:28:05.455342+00:00 ✅ All Tests Passed!121/121 tests passed Capture_V1 Tests✅ 95/95 tests passed View Details
Capture_Ai Tests✅ 5/5 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
Feature_Flags_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
Contributor
|
[Medium risk] Updates agent instructions for conversation session handling. The PR appears safe to merge. Reviews (1) · Last reviewed commit: "fix(mcp): keep conversation_id across la..." |
Matches the TypeScript PR: the changeset is one user-facing line, and the schema unit test asserts the cross-message clause itself, so removing it from the description fails the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lucasheriques
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
In ChatGPT, every new user message started a new MCP analytics session, even though the tool schema carried
conversation_id.conversation_iddescription now adds: "Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request."💚 How did you test it?
conversation_idacross messages, and a new chat got its own.test_add_conversation_id_adds_propertyasserts the cross-message clause, so removing it from the description fails the test.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code, Opus 5.5, with the
/writing-pr-descriptionsskill. A mirror of the TypeScript change, kept character-for-character identical.🤖 Generated with Claude Code