# fix\(server\): Claude artifact watchers no longer keep a thread working · PR \#29331 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/29331)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: open

Source repository: Unavailable fork

Source branch: fix/claude-ambient-artifact-watch-pr

Target branch: main

Head commit: e6a9f63cf1ec4c963bdc5c7c7c1f2d22d85494db

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/29331)

[Commits](https://git.cafe/pingdotgg/t3code/pull/29331/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/29331/diffs?format=markdown)

## Description

---

## Problem

When Claude publishes an Artifact, Claude Code arms a session-long live-updates watcher (`task_started` with `task_type: "monitor_ws"`, `ambient: true`). The Claude adapter only knows `local_bash` as non-subagent work, so it projected the watcher as a subagent that never finishes. The thread stays in Working after the turn ends, until the session is interrupted.

## Change

The adapter records the task id of an ambient `monitor_ws` task_started and drops that task's frames (start, progress, updates, notification) before routing. It is neither a subagent nor Waiting work. Ambient subagents (e.g. the /goal review case from #16598) are untouched, because the check requires `monitor_ws`. Comments on the artifact still reach Claude as a normal wake turn, which the adapter already handles.

## Scope and approval

Fixes #13978 (triaged bug). One focused change in `ClaudeAdapterV2.ts` plus one test.

#17320 targets the same bug, but it has been conflicting with `main` since Oct 26 and is a larger change. This is the minimal version.

## Verification

- New test `does not keep the thread busy for Claude's ambient artifact watch`: fails on `main` (watch becomes a running subagent), passes with the fix.
- `ClaudeAdapterV2.test.ts`: 289/289 pass on the merge with current `main`. Server typecheck is clean.
- Checked against real provider logs: the watcher's frames (`background_tasks_changed`, `task_started`, `task_updated` killed, `task_notification` stopped) match the shape the test uses.
- Not checked: a live end-to-end run in a client.

The branch is based on 611132c171. It merges into current `main` with no conflicts, and the merged tree is identical to the one tested above.

Claude Opus 5.5 in Claude Code (via T3 Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Fixes pingdotgg/t3code#13978

