Skip to content

Junior wrongly says it has no Slack search #2040

Closed

Description

@sentry-junior

During a scheduled daily-brief run, Junior told the user "I have no Slack search" even though slackPublicSearch was among its directly exposed tools. Junior never called the tool. It decided from a capped searchTools result instead, so the brief's mentions section was incomplete and contained a false statement about what Junior can do.

Reported by Richard Roggenkemper.

Timeline (2026-10-06, scheduled run at 12:00 UTC)

  • The task said to search public Slack for @mentions. slackPublicSearch was in the turn's direct tool list.
  • Junior called searchTools with the query slack search messages mentions and the default max_results. Result: total_matches: 27, returned_tools: 5. The 5 returned were searchConversationEvents, slackChannelListMessages, slackThreadRead, reportProgress and memory_searchMemories. slackPublicSearch was not among them.
  • Junior then called searchMcpTools, which listed only the Notion provider.
  • Junior concluded Slack search was unavailable and read three channels' history by hand.
  • A slackChannelListMessages error in the same run said "Public search can discover channels". Junior ignored the hint.
  • The brief said "I have no Slack search ... I couldn't do a full search for your @mentions." A real mention from the previous day was left out.
  • In a later interactive turn, slackPublicSearch worked right away and found that mention.

Verified facts

  • searchTools defaults to returning 5 results (DEFAULT_MAX_RESULTS = 5 in packages/junior/src/chat/tools/search-tools.ts). It returns allMatches.slice(0, maxResults), so tools that match but rank lower are hidden unless the model raises max_results.
  • searchTools results include direct tools as well as deferred ones. Even so, the response gave no sign that a likely direct tool had been cut off.
  • In scheduled runs slackPublicSearch has no Slack action_token. It returns "Public Slack search needs a fresh interactive mention or DM ... scheduled runs cannot search the workspace" (packages/junior/src/chat/slack/tools/public-search.ts, related: Always-on Slack search via service account #1400). So in this run the tool would probably have failed. The accurate message was that search is limited in scheduled runs, not that the capability doesn't exist.

Root-cause hypotheses

  • High: the model treated a capped searchTools result as a complete list of its capabilities and never checked its own direct tool list.
  • Medium: the response doesn't make truncation obvious enough. total_matches > returned_tools isn't reported as "more results exist", and the BM25 ranking scored slackPublicSearch below generic Slack and memory tools for a query about Slack searching.
  • Medium: because the tool can't run in scheduled runs, a direct tool sits in the list but only reports its limit when called. Junior skipped the call, so the actual limit never reached the user. Instead Junior made a broader, false claim.

Unknowns

  • Exactly where slackPublicSearch ranked among the 27 matches for that query.

via richard.

--

View Junior Session [Sentry]

Activity

  1. added
    bug
    on Oct 6, 2026
  2. sentry-junior commented on Nov 9, 2026

    @sentry-junior
    ContributorAuthor

    Covered by #2893. The root cause is tool-search ranking; #2894 and #2898 improved it, and the remaining result-format and steering work is #2893.

    Closed during a tracker cleanup. Reopen if this still needs separate tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions