Skip to content

A Bot says it can do the work before it knows its MCP capability is down — tell it in the system prompt #3273

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 996fccbc55c04237b11177afbdbbca47
Branch: dev/1-capability-prompt
Base: 4a3ad73
At: 2026-11-21T00:46:20Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

The user problem

A Bot does not know that one of its attached MCP capabilities is down. The user says
"check the open PRs on GitHub"; the Bot answers as if it can, and the first real attempt
fails half a turn later with Could not connect: 401 bad credentials — after it has
already promised work. The only places that know the truth are the client badge and a
tool the Bot would have to think to call:

  • core/src/host/channel.js:223 → roster.capabilityStatuses: rt.capabilityStatusesView() (client badge)
  • core/src/host/tools.js:796 → list_capabilities (visible only if the Bot calls it)
  • core/src/host/prompt.js → grep -c capabilit = 0: nothing in the system prompt

So the sentence "I can do that" is written before any evidence reaches the model.

Expected behaviour

The system prompt carries one line per attached capability whose state is error or
needs-approval for the rendering Bot, naming the capability and the reason, and telling
the Bot to say so before acting. When every attached capability is ready (or the Bot has
none), the prompt is byte-identical to today's — a healthy Bot's cached prefix must not
move.

Scope (one file of code, T2)

  • core/src/host/prompt.js: a second ctx.systemPrompt.section beside bot-identity
    (order: 700, interpolate: false), text from rt.capabilityStatusesView()[bot.id]
    filtered to error / needs-approval, one - <name> (<kind>): <reason> — tell the user before acting. line each, empty string when nothing is unhealthy. Do not put this text in
    the identity section: prompt.js states that section must stay byte-stable.
  • core/test/prompt.test.js: red-first case + the reverse (all-ready) case.
  • changelog.d/<this issue>.fixed.md.

No new tool, no protocol change, no client change, no gate-file change. Reuse the existing
primitives capabilityStatusesView() (core/src/host/capabilities.js) and
ctx.systemPrompt.section — both already used on this path.

Acceptance (must be red on the base, green after)

  1. With capabilityStatusesView()[bot.id].github = {state: 'error', error: '401 bad credentials'},
    the rendered system prompt contains both github and 401 bad credentials.
  2. With {state: 'needs-approval'}, the prompt names github and asks the Bot to tell the
    user before acting.
  3. With every capability ready or with no capabilities attached, the rendered prompt is
    character-for-character what the same code renders today (no extra section, no blank line).
  4. node --test core/test/prompt.test.js and node --test core/test/capabilities.test.js
    pass twice in a row.

Risk

{"tier":"T2","why":[],"files":3,"basis":[{"path":"core/src/host/prompt.js","tier":"T2"},{"path":"core/test/prompt.test.js","tier":"T1"},{"path":"changelog.d","tier":"T1"}]}
— core/src/host/** is T2 in .github/agent/risk-rules.json; test and changelog are T1.
No gate file is involved.

User-visible result, and no UI face

The Bot opens with "GitHub isn't connected (401 bad credentials)" instead of agreeing and
then failing. No UI face: no client, CSS or copy change — Verdict should say so and no
screenshot is needed.

Duplicate check (read on live main 4a3ad73274111bba22e3e9628b7a9e5f5c7bc62b)

  • GitHub search capabilityStatuses → 0 hits; list_capabilities → 2 closed, unrelated
    (#768, #1445).
  • "system prompt" capability → #895 (closed: the prompt moving per child turn),
    #517 (closed RFC), #796 (closed cost research); capability error prompt → #3114
    (open search shell), #2483 (open baseline umbrella), #1979/#2582 (closed, code-point
    cuts). None covers a Bot being told its own capability is down.

Bot: FlyBot Product (competitive read, Claude Code v2.1.330, 2026-11-20T22:32:56Z)
Written-by: FlyBot Lead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions