Skip to content

Kimi (ACP): turns that fail inside Kimi are shown as completed, with tool calls 'completed' and echoed arguments as results #6775

Open

Description

@maximzhelepa-cyber

Summary

On a Kimi Code (ACP) thread, Kimi's own logs show three turns in a row ending with reason: "failed", but bb displayed each one as a successful turn: status completed, with every tool call completed and its "result" showing the echoed tool arguments. To the user, the agent says one sentence, appears to run a few tools, and goes idle with no error and nothing to retry. The agent couldn't see the failure either: it told the user "nothing broke". I expected bb to show the turn and the tool calls as failed, with the error text.

Versions and environment

  • bb 0.48.1 (desktop app), macOS 26.6.2, local host, project-checkout environment (no worktree, no Connect)
  • Provider kimi-code (ACP), Kimi Code CLI 2.3.1, model kimi-code/k3.1-pro
  • bb permission mode full; Kimi session option mode=auto at thread start

Steps to reproduce

Observed once in real use; I did not reproduce it deliberately, so this is unverified as a repro. What happened:

  1. In a long Kimi thread (~257k context tokens), the model called the EnterPlanMode tool on its own before a large task.
  2. Kimi wrote plan_mode.enter to its wire log, but the plan file was never created. The tool returned:
    Tool "EnterPlanMode" failed: ENOENT: no such file or directory, open '~/.kimi-code/sessions/<wd>/<session>/agents/main/plans/<id>.md'
  3. In the same turn, the model issued 4× Skill + 1× Read. On the next step Kimi's plan_mode context provider read the missing plan file through the client connection, got RequestError: ENOENT (stack: Connection.handleResponse → receiveWireMessage), and the step was interrupted. All pending tool calls failed with that ENOENT and the turn ended failed.
  4. Every later user message failed the same way on its first step (turns 3 and 4).

A probable minimal path is to ask a Kimi 2.3.1 ACP thread to call EnterPlanMode and then any tool, but I haven't run it.

Expected vs actual

Kimi wire.jsonl (truth on the agent side), turn 2:
  {"type":"plan_mode.enter","id":"tigra-rocket-dc-sentry"}
  {"type":"turn.step.interrupted","turnId":2,"step":2,"reason":"error","message":"ENOENT: no such file or directory, open '…/agents/main/plans/tigra-rocket-dc-sentry.md'"}
  {"role":"tool","content":"Tool \"Skill\" failed: ENOENT: no such file or directory, open '…/plans/tigra-rocket-dc-sentry.md'"}   (×4, plus Read)
  {"type":"turn.ended","turnId":2,"reason":"failed","error":{"code":"internal","name":"RequestError","message":"ENOENT: …"}}
  {"type":"prompt.completed","reason":"failed"}
Kimi state.json: "lastTurnReason": "failed"

bb thread log --json for the same turn:
  seq 1168 item/completed toolCall status=completed result={"skill":"zhelezobeton","args":"…"}
  seq 1169 item/completed toolCall status=completed result={"skill":"mxz-stack"}
  seq 1172 item/completed toolCall (Read) status=completed result={"path":"…/linarm-harness/SKILL.md","max_chars":30000}
  seq 1173 turn/completed status=completed
(the same pattern for turns 3 and 4: seq 1207–1212 and 1248–1252)

Expected:

  • Turn status: failed/error, with the error message and a retry option.
  • Tool items: failed, with the tool's error text instead of the echoed arguments.

Evidence

  • bb thread thr_hb6rzznikj, project proj_q4sd7ptc59, environment env_88hca3q2qd. Events seq 1107–1253 (the turns started 2026-10-31 20:01:18Z, 20:04:13Z and 20:05:48Z).
  • Kimi session session_0a38d6ff-445c-4d55-8afe-3cf47d2e0b05: agents/main/wire.jsonl lines 676–742; logs/kimi-code.log has 3× ERROR context provider failed; skipping it name=plan_mode + RequestError: ENOENT. The agents/main/plans/ directory exists (created at the same second as plan_mode.enter) but is empty.
  • Scale: of 421 local Kimi sessions, only this one hit it. Over 7 days, 53 Kimi turns ended failed (50 provider 429 quota, 3 this ENOENT). I didn't check how bb displayed the 429 ones.
  • Not determined: whether Kimi's ACP prompt response carried an error/stop reason that bb dropped, or Kimi itself returned a normal stop. ~/.bb/logs has no ACP trace for this session.

What you ruled out

Suggested priority and effort (optional)

Medium. It is rare to trigger, but once triggered the thread is dead and nothing tells the user why. A workaround exists if you know about it. No data was lost. Effort is probably Low if the ACP bridge already receives a failure signal.

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Investigation: bb thread thr_jwpswhu383 (local), source thread thr_hb6rzznikj.

AGENT GENERATED

Activity

  1. added theissue type on Oct 31, 2026
  2. added
    providers
    provider-acp
    on Oct 31, 2026
  3. maximzhelepa-cyber commented on Oct 31, 2026

    @maximzhelepa-cyber
    Author

    Deliberate repro, 2026-10-31, bb 0.48.1 desktop, macOS 26.6.2. Each run used a fresh hidden thread in an empty unmanaged workspace containing one probe.txt, with --provider kimi-code --model kimi-code/k3.1-pro --permission-mode accept-edits.

    Kimi Start option Prompt Kimi wire log bb shows
    2.3.1 mode=auto call EnterPlanMode, then Read probe.txt plan_mode.enter → EnterPlanMode ENOENT on plans/<id>.md → turn.step.interrupted reason=error → Tool "Read" failed: ENOENT … → turn.ended reason=failed EnterPlanMode item failed; Read item completed with echoed args; turn/completed status=completed; no final message
    2.4.1 mode=auto same EnterPlanMode is no longer offered to the model; Read returns the file; turn.ended reason=completed correct
    2.4.1 mode=plan Read probe.txt only plan_mode.enter → turn.step.interrupted reason=error (ENOENT on plans/<id>.md) → Tool "Read" failed: ENOENT … → turn.ended reason=failed Read item completed with echoed args; turn/completed status=completed; no final message

    Minimal repro on the latest Kimi: bb thread spawn --provider kimi-code --option mode=plan --prompt "Read ./probe.txt and quote it". The first tool call fails inside Kimi, and bb reports the turn and the tool as completed.

    So in 2.4.1 the model can no longer trigger it on its own, but starting or switching a Kimi thread to Plan mode from bb still breaks every turn. Plan mode looks unusable with Kimi under bb. The plan file directory is created but stays empty. The bb part (failure reported as success) reproduces on both versions.

    AGENT GENERATED

  4. added
    partial-repro
    on Oct 31, 2026
  5. bb-slop-cop commented on Oct 31, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium · providers, provider-acp.
    • Report: https://get-bb.github.io/reports/issues/6775.html
    • Verdict: PARTIALLY REPRODUCED · root-cause confidence: medium · reproduction label: partial-repro.
    • Root cause demonstrated: Non-cancellation completion marks unfinished tools completed and promotes their last progress text into results. Synthetic failure-valued stop reasons also complete; explicit ACP tool failures and provider errors are preserved.
    • Verification: Two clean trusted-main checkouts produced the same two expected diagnostic failures and three passing controls; 113 existing tests and package typecheck passed.
    • No PR: The actual Kimi ACP failure response remains uncaptured; changing completion semantics without that evidence would be speculative.

    AGENT GENERATED

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

    partial-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions