Skip to content

fix(mcp): agent toolkit fixes from the stage test - #303

Merged
bk-agent-01 merged 1 commit into
stagefrom
mcp/agent-toolkit-eval-fixes
Oct 11, 2026
Merged

bk-agent-01 merged 1 commit into
stagefrom
mcp/agent-toolkit-eval-fixes

Conversation

@bk-agent-01

Copy link
Copy Markdown
Collaborator

Problem

A 10-task test of the agent toolkit, through a real OAuth client on stage, found four gaps:

  1. Missed reply. t3_wait after t3_answer missed the reply, because the agent finished before the wait began. The next-call hint had no cursor.
  2. No command on approvals. An approval showed the agent's description ("Write current date to date.txt"), not the command (date > …/date.txt).
  3. Background work read as finished. A turn that ended on background work the agent waits for read as "unread", not "running".
  4. Short list too large. The OAuth tool list was about 12,700 tokens. The target is under 10,000.

Fix

  1. t3_answer, t3_send_message and t3_start_session take the session's event cursor before the write, and return it in the next-call hint and in the JSON.
  2. An approval shows the exact command or file, read from the run's unfinished command_execution or file_change item.
  3. isAgentActive counts pending background work that wakes the agent, using the sidebar's own helper backgroundWorkHoldsCompletion.
  4. The short list keeps t3_ui_list_tools and t3_ui_call (about 8,200 tokens). t3_ui_get_tool and t3_ui_batch are still available with x-t3-mcp-tools: all.

node scripts/check-fork-markers.ts passes locally.

🤖 Generated with Claude Code

The 10-task test through an OAuth client on stage found four gaps:
- A wait after t3_answer, t3_send_message or t3_start_session missed a reply
  that came before the wait began. Their results now carry the session's
  event cursor taken before the write, and the next-call hint passes it.
- An approval showed the agent's description, not the command. It now shows
  the exact command (or file) from the run's unfinished tool item.
- A turn that ended on background work the agent waits for (a background
  command, a subagent, a monitor) read as unread; it counts as running, as in
  the sidebar.
- The OAuth short list was about 12,700 tokens. It keeps t3_ui_list_tools and
  t3_ui_call and drops t3_ui_get_tool and t3_ui_batch (opt in for them), about
  8,200 tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 11, 2026
@bk-agent-01
bk-agent-01 merged commit 48636fb into stage Oct 11, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant