chore: handle Monitor tool in stream parsing (v2.1.98) #258

Closed
opened 2026-04-13 09:12:00 -07:00 by hikari · 1 comment
Owner

Context

Claude Code v2.1.98 added a new Monitor tool that streams events during execution. This is a new built-in tool name that will appear as a tool_use block in stream-json output, alongside existing tools like Bash, Read, Edit, Write, Grep, Glob, Task, etc.

Why This Matters

We use tool names to drive character state transitions in wsl_bridge.rs. The constants SEARCH_TOOLS and CODING_TOOLS determine which character state is shown. An unrecognised tool name currently falls through to a default state, which may not be ideal for the Monitor tool.

The Monitor tool streams events — it's more of an observational/diagnostic tool rather than a coding or searching action. We should decide what character state best represents it.

Tasks

  • Confirm what the Monitor tool's name field looks like in stream-json tool_use blocks
  • Decide which character state is appropriate (likely Mcp or Searching, given its observational nature)
  • Add "Monitor" (or whatever the actual tool name is) to the appropriate constant in wsl_bridge.rs
  • Add tests for the new tool name mapping

References

  • Claude Code v2.1.98 changelog
  • src-tauri/src/wsl_bridge.rsSEARCH_TOOLS, CODING_TOOLS constants
  • src-tauri/src/types.rs

This issue was created with help from Hikari~ 🌸

## Context Claude Code v2.1.98 added a new **Monitor tool** that streams events during execution. This is a new built-in tool name that will appear as a `tool_use` block in stream-json output, alongside existing tools like `Bash`, `Read`, `Edit`, `Write`, `Grep`, `Glob`, `Task`, etc. ## Why This Matters We use tool names to drive character state transitions in `wsl_bridge.rs`. The constants `SEARCH_TOOLS` and `CODING_TOOLS` determine which character state is shown. An unrecognised tool name currently falls through to a default state, which may not be ideal for the Monitor tool. The Monitor tool streams events — it's more of an observational/diagnostic tool rather than a coding or searching action. We should decide what character state best represents it. ## Tasks - [ ] Confirm what the `Monitor` tool's `name` field looks like in stream-json `tool_use` blocks - [ ] Decide which character state is appropriate (likely `Mcp` or `Searching`, given its observational nature) - [ ] Add `"Monitor"` (or whatever the actual tool name is) to the appropriate constant in `wsl_bridge.rs` - [ ] Add tests for the new tool name mapping ## References - Claude Code v2.1.98 changelog - `src-tauri/src/wsl_bridge.rs` — `SEARCH_TOOLS`, `CODING_TOOLS` constants - `src-tauri/src/types.rs` ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Resolved in PR #261. Added "Monitor" to SEARCH_TOOLS in wsl_bridge.rs so it maps to CharacterState::Searching.

Resolved in PR #261. Added `"Monitor"` to `SEARCH_TOOLS` in `wsl_bridge.rs` so it maps to `CharacterState::Searching`. ✨
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#258