Skip to content

[Bug]: A message sent while an approval is pending silently declines it, and the agent gets the text as an unlabeled tool error #27854

Closed

Description

@DamonYoungWork

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

Composer, approvals (Claude provider; probably every provider with approval feedback)

Steps to reproduce

  1. In a full-access Claude thread, have the agent run a command that a PreToolUse hook answers with ask. A "Waiting for approval" prompt appears inline.
  2. Without clicking Approve or Decline, type a normal chat message to the agent in the composer and send it.

Expected behavior

Either the message reaches the agent as a user message and the approval stays pending, or the UI makes it unmistakable that sending will decline the pending call. Whichever way it goes, the agent should know the text is a user message attached to a decline.

Actual behavior

The composer's placeholder changes to "Send feedback to decline this request". Sending declines the approval with the text as feedback (runtime-request.respond, decision: "decline", feedback: <text>). The text never appears to the agent as a user message. The agent only gets a failed tool call whose error text is the user's words, with no label:

{"type":"tool_result","content":"Seems a Pi agent is waiting for approval.","is_error":true}

The user didn't realize they had declined anything. They had typed a remark to the agent while a prompt was pending, which is easy to do when prompts arrive while you're reading. It happened three times in one session. Each time the agent treated the text as a system or harness message and misdiagnosed it.

Impact

Silent declines plus lost user messages. The user thinks they sent a message and nothing was declined. The agent never answers the message and misreads the error, so the conversation drifts. Agents also can't tell user feedback from tool errors.

Suggested fixes:

  • Make "send = decline" explicit: a visible banner or a confirm step, or require an explicit Decline click before free text counts as feedback.
  • Label the feedback for the agent, for example The user declined this tool call and said: "<text>". Claude Code itself words its rejection messages along these lines.

Version or commit

T3 Code (Beta) desktop 0.1.5

Environment

macOS (Darwin 27.2), Claude provider through a custom provider instance (Claude Agent SDK), model claude-opus-5-5, thread runtime mode full-access, PreToolUse hook returning ask.

Logs or stack traces

Server trace at the moment of the decline: EnvironmentCommands.respondToThreadApproval → Orchestrator.dispatchRuntimeRequestRespond → RuntimeRequestService.respond → ClaudeAdapterV2.respondToRuntimeRequest, initiated from the desktop client. The provider event log then shows the tool_result above.

Activity

  1. added a commit that references this issue on Nov 11, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions