Repository navigation
fix(mcpl): a failed MCPL request, the framework's refusals of an MCPL tool call, and the blocks the host can't show say what happened in the agent's words #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nissa-seru
merged 15 commits into
anima-research:main
from
nissa-seru:fix/mcpl-agent-words
Oct 18, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
73fb941
fix(mcpl): a failed MCPL request, the framework's refusals of an MCPL…
90b1519
fix(mcpl): the af-w4a round: remedies where this host won't reconnect…
2f8796b
fix(mcpl): the af-w4a-2 round: an error answer with no words says its…
a3ecde0
fix(mcpl): the af-w4a-3 round: an error result of only whitespace rea…
7b10c6d
fix(mcpl): a tool call while this host connects to its server says so
88bf0ff
fix(mcpl): the af-w4a-4 round: a request after this host's own close …
b2f525f
Merge main 6dfea06fa into W4a: #247's McplRequestError keeps its clas…
acf2595
Merge main d1b9d35c8 into W4a: #510's reference registration beside W…
6975a5b
fix(mcpl): a request after this host's own close says whom to ask if …
689395e
Merge main 8a32054d9 into W4a: the 0.22.3 cut, #469 and #193 (train T…
8cc1a75
fix(mcpl): a runtime connect or restart of a server whose connect is …
eb0db7a
docs(changelog): a runtime connect or restart of an MCPL server whose…
6b8bbc7
fix(mcpl): a disconnect of a server whose connect is in flight is ref…
da8ee05
docs(changelog): say which connection a second connect in flight repl…
be7fd47
Merge main 9e3e407c7 into W4a: #518, #220, #521 and #517 (trains V an…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| - The MCPL texts an agent reads for a failed request, a refused tool call and a block the host can't show now say what happened, whether anything took effect, and what works from there, or that nothing does. Method names, request ids, JSON-RPC codes, close details and field names leave them. The ones an operator needs go to the host's log. | ||
| - **A failed MCPL request:** | ||
| - A connection that closes with a call pending reads `The connection to the "<server>" server closed before it answered, so whether the request took effect is unknown.` It then says whether this host is reconnecting, where it read `MCPL server "<server>" disconnected unexpectedly (code=…, signal=…, reason=…) while awaiting <method> (id=N)`. | ||
| - The other texts change the same way: a close by this host, a request on a closed connection or one the transport couldn't write, a server's error answer (in the server's own words, or, with none, saying the outcome is unknown) and a timeout. | ||
| - The log gains a line for a close with requests pending, with the close's code, signal and reason, whether this host closed it, and the requests left unanswered; one for a server's error answer, with its method, id and code; one for a timeout, with its method and id; and one for a request the transport couldn't write, with its method, id and the transport's words. | ||
| - **The framework's MCPL tool calls:** | ||
| - A call to a server missing from the registry, or to a tool its policy denies, says it didn't run and whether anything can change that, in the same words for the model's call and a script's. One made while this host is connecting to the server, in a runtime connect or a restart's, says so and to try again in a moment. | ||
| - An error result with no text, or only whitespace, reads as one whose effect is unknown, where it read `Tool call failed`, or the blank text. | ||
| - A conversation's `channel_open` is told where to reply. | ||
| - **Blocks the host can't show** read as what they were and why: `[Image not shown: …]`, `[Audio not shown: …]`, `[Reference not shown: …]`, `[Content not shown: …]`, and the text marker `[Text not shown: a text part arrived without readable text.]`. They had read `[Image: no data]`, `[unrecognized content block: …]`, `[inline content withheld: …]` and `[Text not shown: the server's text block had no string text.]`. An image or audio block with an empty link and no data reads as the no-data marker on the tool-result lane too. | ||
| - **A reference's expiry and missing server** read `expired`, `treated as expired, since its expiry time can't be read`, `treated as expired, since its expiry time isn't in a form this host accepts` and `not tied to any server, so there's nowhere to fetch it from`. They had read `expired: its expiresAt has passed`, `… (fail closed)` and `unbound: no server is recorded to fetch it from`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - A runtime connect, a restart or a disconnect of an MCPL server whose connect is still in flight is now refused before it changes anything, with `MCPL server "<id>" has a connect in flight; try again once it settles`. Nothing stops a connect in flight. A second connect went ahead beside it, and whichever settled last replaced the other in the registry without closing it. A disconnect removed the server's config and tool prefix, and the connect then registered the server without them, where no call reached it and only another disconnect cleared it. A restart begins with that disconnect. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During a runtime restart,
connectMcplServerInternalrestores the tool prefix beforeaddServerfinishes connecting. A tool call in that window reaches this message even though the host is already bringing the server back. Telling the agent it won't reconnect sends it to the operator instead of letting it retry later. Check for a pending connection, or avoid treating a missing registry entry as permanent.Knowledge Base Used: MCPL transport and server registration
Prompt To Fix With AI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is right, and it's fixed at
6975a5bf.While this host connects to a server, at runtime or in a restart, the server's tool prefix already routes its calls, but the registry holds the server only once its handshake is done. So a call in that window was told that the server isn't connected, that this host won't reconnect to it on its own, and to ask whoever runs this host, for something that settles in moments.
The framework now keeps the ids whose connect is in flight. Both refusals, the model's call and a script's, check them first:
This host is connecting to the "<s>" server that provides <tool>, so the call didn't run. Try again in a moment.After a connect that fails without reconnect, a call gets the earlier text, which is true by then.The same claim stood in a restart's close. A request on a connection this host has closed said the host wouldn't reconnect to it, though a restart closes the connection before it connects again. It now reads
The request wasn't sent: this host closed its connection to the "<s>" server, so nothing ran. If calling it again fails, ask whoever runs this host.Written by Cordelia-2434.
— Lottie-2661