feed.research named the tool and threw its papers away - #13
Merged
Merged
Conversation
MEASURED from a live Discord session 2026-09-18. Asked to "research
orthogonalized mixtures of experts", the agent routed correctly, called
feed.ask, and then told the reader it had "only a summary count rather than
the specific details or titles". Asked for "the explicit corpus" it
apologised; asked to "retrieve the full assets" it said it would need an ID
first. It was not being evasive -- `_compose` really did hand it nothing
else, and the reader spent ten minutes negotiating with a tool that already
had the answer.
Two causes, both in mcp/ask.py:
`_RESULT_KEYS` listed `items` but not `papers`, which is the key
feed.research returns, so `_summarise` fell through to the bare message --
"3 paper(s) from arxiv, pubmed; 3 new in the library". That is the exact
failure `_RESULT_KEYS`'s own comment warns about ("a route whose result key
is absent here degrades to a bare count, which is silent") and the same one
already fixed once for kg.path and kg.neighbors.
`refs` was built only from rows carrying `item_id`. A research hit is a
library row and has no item_id, so every paper was filtered out and the
reader was told about work it had no way to open. Papers now ride on the
doi/arXiv id cite.lookup takes.
`_refs` is split out of `_compose` because the complexity gate refused the
inline version at 14 against a limit of 10 -- the gate's call, not a
preference. ask.py's size cap goes 379 -> 383 with the reason recorded
beside it.
Not fixed here, and not a code defect: arXiv intermittently answers 406 to
the research client, which is why that session's library holds three PubMed
rows and no arXiv ones. Retries of the identical URL succeed, so it reads as
throttling rather than a malformed request.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What
feed.askrouted a research question correctly, calledfeed.research, and then dropped its results. The reader got a count and an apology.Measured from a live Discord session, 2026-09-18. Asked to "research orthogonalized mixtures of experts", the agent answered that it had "only a summary count rather than the specific details or titles". Asked for "the explicit corpus" it apologised; asked to "retrieve the full assets" it said it would need an ID first. It was not being evasive —
_composereally did hand it nothing else.Two causes, both in
mcp/ask.py1.
paperswas not in_RESULT_KEYS. The tuple listeditems, which is whatfeed.listreturns, butfeed.researchreturnspapers. So_summarisefell through to the bare message. This is the exact failure that tuple's own comment warns about:Same bug already fixed once for
kg.pathandkg.neighbors; it recurred on the next route added.2.
refswas built only from rows carryingitem_id. A research hit is a library row and has noitem_id, so every paper was filtered out and the reader was told about work it had no way to open. Papers now ride on the doi/arXiv idcite.lookuptakes.Before / after
Same payload through
_compose:For contrast,
feed.listwas always fine — it returnsitems.Gates
Both gates that pushed back were right, and neither was worked around:
_composeat 14 against a limit of 10), so_refsis split out. The gate's call, not a preference.All eight pass: ruff format, ruff check, ty, uv.lock, complexity, bandit, xenon, pytest (1863 passed).
Regression test is
test_feed_research_answer_names_the_papers_and_carries_their_links, pinned the same way as thekg.askone it rhymes with.Not fixed here
That session's library holds 3 PubMed rows and zero arXiv, though every paper shown was arXiv: arXiv intermittently answers 406 to the research client. Retries of the identical URL succeed and curl succeeds, so it reads as throttling rather than a malformed request. Worth watching — if it persists,
ArxivSearchwants retry-on-406 — but not worth building machinery against one afternoon's evidence.🤖 Generated with Claude Code