Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.195 Home All releases olderv2.1.193 v2.1.196newer
Claude Code v2.1.195

Monitor Tool WebSocket Support

What

The Monitor tool now accepts a ws source that opens a WebSocket and streams each incoming text frame as a notification event — no shell process, no polling needed.

Usage
Monitor({
  ws: { url: 'wss://events.example.com/stream', protocols: ['v1'] },
  description: 'deploy events',
})
Details
  • Each text frame becomes one notification; multiline frames stay as one event.
  • Binary frames are reported as [binary frame, N bytes] rather than passed through.
  • Socket close ends the watch; close code and optional reason are surfaced.
  • WebSocket errors appear before close as [WebSocket error: ...].
  • Same rate-limiting as bash monitor — a firehose is suppressed and eventually stopped.
  • Blocks connections to private/link-local/cloud-metadata IP ranges (SSRF protection) and respects sandbox.network.deniedDomains and allowManagedDomainsOnly.
  • Compliance taint disables arbitrary-URL WebSocket egress with a clear message: "Monitor cannot open a WebSocket: arbitrary-URL egress is disabled by your organization's compliance policy."
  • Cannot be combined with command.
Evidence

New MonitorWsTask and MonitorWsPreconditionError types (search for "MonitorWsTask", "MonitorWsPreconditionError", "ws source")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.195 →