Repository navigation
fix(shared): give attached threads a canonical read call - #23784
NikitaMGrimm wants to merge 4 commits into
Conversation
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 5 minutes. View limit details
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Merge Risk:
|
|
Note Written by kept @NikitaMGrimm's implementation unchanged and merged current main into the writable contributor branch. the final diff remains two changed lines: serialize the canonical verification on
unverified: a fresh live provider/client attachment-to-read round trip. there is no visible ui change. github ci passed, including build/typecheck, lint, web tests, all eight server shards, the shared tests, and release smoke. github reports |
Problem
An attached thread has two IDs: the context pairing ID shown in the marker and link (
thread_<uuid>), and the canonical thread ID. The generated instruction only sayst3_thread_read(threadId), so agents copy the pairing ID and getthread_not_foundeven though the thread exists. Reproduced on a live Windows nightly: the pairing ID failed, and the canonical ID read the same thread.Change
The shared provider context formatter now writes the call with its argument, for example
t3_thread_read({"threadId":"<canonical id>"}), usingrecord.threadId. Marker/envelope pairing, exact thread lookup, and permissions are unchanged.Scope and approval
Related: #15849 and its duplicate #19639, both closed without a fix. The triage on #15849 lists a prompt-side correction as one possible direction. This is submitted under the small, focused obvious-bug exception: one generated instruction now supplies the existing tool's correct argument, with no ID aliasing, permission change, or new workflow. It does not implement the server-side resolver options from those reports, and it does not fix histories that were already injected. #22452 fixed a different problem (a missing
mcp:prefix).Verification
vp test run --config ../../vite.config.ts src/composerContextReferences.test.tsinpackages/shared: the existing projection case now asserts the exactt3_thread_read({"threadId":"abc"})call. It fails against the unchanged formatter and passes 17/17 with the fix.t3_thread_readwith the generated argument returned the existing thread. No live state was modified.This applies to newly projected context on the provider start and steer paths shared by all providers and clients. There is no visible UI change.
Note
🤖 Agent assistance via T3 Code