Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
One boundary I'd pin here: for a Right now the new representation is: [item.name, item.uri, item.description]and the existing 20k result cap is applied afterwards. That means a long enough A small regression should expose it:
and assert that the returned text still contains the URI. I'd preserve the contract as:
Putting a labeled/bounded URI representation first (then bounded name/description) would also make the three fields unambiguous to the model rather than relying on line position. AI-use note: I used an AI assistant to trace the new resource-link formatting through the existing result-size cap and draft this review; I verified the current PR head before posting. |
|
Approved to merge, but it now conflicts with main in |
84eb6da to
5e3d261
Compare
|
Rebased onto main; both sets of @kvnloo Taken as stated. The link is now shown with the URI first and whole, and the title or name and the description cut at 400 characters, so a link's own metadata cannot spend the result cap its pointer has to fit in. Each line is labelled ( @davidmckayv
|
Review on the first cut: the link was shown as name, URI, description and the result cap was applied afterwards, so a name long enough could push the URI past MAX_RESULT_CHARS and the model would again hold a link with nowhere to go, the failure this reader exists to remove. The URI is the link's identity and the rest is metadata, so the URI now leads, whole, and the title or name and the description are cut at 400 characters. Each line is labelled, so the fields are told apart by name rather than by position. The spec's title is shown over the name when a server gives one. A regression with a name as long as the cap asserts the pointer stays readable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
What this changes
A tool that points at a file or a page often returns a
resource_link: a URI, a name, and a sentence of what it is, rather than the contents themselves. That part was named[resource_link]and the URI was dropped, so the model was told a link arrived and never shown where it went. A search that answered with pages produced no page it could open.The URI, name and description are now read, each on its own labelled line. The URI leads, whole, and the title or name and the description are bounded at 400 characters, so a link's own metadata cannot push its pointer past the result cap: truncation may lose what a resource was called, never where it is. The spec's
titleis shown overnamewhen a server gives one. A part that already carried text is unchanged. A link that names nothing is still named[resource_link], rather than dropped.Where it runs
OpenBot is deployed as several server processes behind a load balancer, serving a whole company.
Consecutive requests from the same person reach different processes, and the process that answered a
WebSocket upgrade is rarely the one that answers the next call on that conversation.
State that outlives a single request therefore has to be shared, or the change works on one machine
and stops working the moment there are two, without saying so. That failure is worse than not
shipping the feature: it passes review, passes CI, passes a local demo, and only surfaces as a Bot
that forgets, a question nobody can answer, or a boundary that never fires.
Answer these even when the answer is "none":
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
On unmodified
main, with the new tests present:After the fix:
bun test tests/mcp-result.test.tsinserver→ 24 pass, 0 fail. Neighbouringmcp-protocolandmcp-listingsuites with it: 38 pass, 0 fail.bunx tsc --noEmitinserverexits 0. Biomeformatandlintclean on the changed files.AI-assisted (Grok)