Skip to content

Group peer turns are offered ask_person and message_bot, but every call is refused #716

Description

@Chebaleomkar

A group peer turn is offered ask_person (and message_bot when maxDepth > 1), but every call from it is refused.

  • A Bot-to-Bot relay turn runs at depth >= 1 and is signed with that depth and no handoff claim (runBot passes depth: turn.depth).
  • authoriseCoordinationRun in server/src/agents/handoff-tool.ts returns, for a run with no handoff, (run.depth ?? 0) === 0 && source.botId === run.botId. That is false at depth 1.
  • So the call is refused with "This run no longer has permission to coordinate work in this conversation", and an mcp.callback_refused audit row is written.
  • Meanwhile toolsForRun still offers ask_person at any depth.

The Bot is shown a tool that always fails, and the audit trail fills with refusals nobody caused.

There are two ways to make these agree:

  1. Accept depth > 0 without a handoff claim when the source thread is the Bot's own group thread and the run's initiator is a handoff.
  2. Don't offer the coordination tools at depth > 0 without a claim.

Which is intended? I can send a PR for either.

Activity

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