Log the feedback a model drafts about its own turn - #13
Merged
Merged
Conversation
mipsel64
force-pushed
the
block-client-tools
branch
from
September 14, 2026 05:52
00b42bd to
c2a30bf
Compare
mipsel64
force-pushed
the
block-client-tools
branch
from
September 14, 2026 05:54
c2a30bf to
379e8b9
Compare
Claude Code's SendFeedback tool drafts a bug report when it judges that a turn went wrong, and a model behind tinyllm fires it at its own mistakes. Those drafts are also a bug report about tinyllm: a model saying it misread a request may be describing something the translation dropped - a message part, a tool result, reasoning lost across a continuation. They were queued in the client and never reached the operator running the gateway. `RequestBody::drafted_feedback` reads the tool call out of the request that carries it and `endpoint::run` logs the whole input at warn, next to the model and request ID. It inspects only the last exchange: an assistant message holding a SendFeedback tool_use, followed by the user message with its results. That is true of exactly one request per draft, so a stateless gateway reports each once instead of re-logging it every turn as the history grows. The tool itself is forwarded untouched. Stripping the definition would stop the drafts, but it would also stop the signal, and the call is a noop for the session: the draft is queued in the client, which is why it never interrupts the conversation. Swallowing the tool_use in the response would silence it without losing the log, but dropping a call that was the model's only action ends the turn early and stops work mid-task.
mipsel64
force-pushed
the
block-client-tools
branch
from
September 14, 2026 05:56
379e8b9 to
0200155
Compare
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.
Claude Code's
SendFeedbacktool drafts a bug report when it judges that a turnwent wrong, and a model behind tinyllm fires it at its own mistakes. Those drafts
are also a bug report about tinyllm — a model saying it misread a request may be
describing something the translation dropped: a message part, a tool result,
reasoning lost across a continuation. They were queued in the client and never
reached the operator running the gateway.
Changes
RequestBody::drafted_feedbackreads the tool call out of the request thatcarries it;
endpoint::runlogs the full input atwarnwith the model andrequest ID.
SendFeedbacktool_use, followed by the user message with its results. Thatmatches exactly one request per draft, so a stateless gateway reports each once
instead of re-logging it every turn as the history grows.
README.md. No new configuration.Why not block the tool
Stripping the definition from the forwarded tool list would stop the drafts, but
it would also stop the signal, and the call is a noop for the session: the draft
is queued in the client, which is why it never interrupts the conversation.
Swallowing the
tool_usein the outbound response would silence it withoutlosing the log, but dropping a call that was the model's only action ends the
turn early and stops work mid-task — and a stream cannot tell that in advance
without buffering.
Testing
drafted_feedback_is_read_from_the_turn_that_just_completedcovers the carryingrequest, including a draft batched with another tool call, and the six shapes
that must stay silent — among them the same draft further back in the history.
Full suite: 112 passed, clippy clean.