Skip to content

v1.4.1 — accept v2.1+ Agent tool_use name in transcript parser

Latest

Choose a tag to compare

@Samuel0101010 Samuel0101010 released this 19 May 22:30

Bugfix. Closes the label-correlation loop end-to-end on Claude Code v2.1+.

The bug

v1.3's transcript correlator parsed the session JSONL via transcript_path from the WorktreeCreate payload and filtered tool_uses with name === "Task" to find subagent dispatches. Claude Code v2.1.x renamed that tool_use to name === "Agent" in its on-disk transcript schema, so the filter rejected every entry. pending-tasks stayed empty, displayLabel was never written, and the TUI fell back to the hex worktree slug.

The v1.4 TUI render-side fix (prefer displayLabel over name) was working correctly — there was just nothing to render because of this upstream parse miss.

Evidence from a real v2.1.144 session

In the user's plugin-test session JSONL:

  • "name":"Task"
  • "name":"Agent" (e.g. {"type":"tool_use","name":"Agent","id":"toolu_...","input":{"subagent_type":"wisp-self-test",...}})

payloadKeys from the WorktreeCreate hook log confirmed transcript_path IS delivered — the data was always there, our filter was wrong.

The fix

One line in src/wrap/transcript-correlator.ts:

if (p.type !== "tool_use" || (p.name !== "Task" && p.name !== "Agent")) continue;

Accept both names so legacy and v2.1+ transcripts both work.

Tests

82 → 83 (+1). New case asserts the v2.1+ "Agent" shape with a plugin-namespaced subagent_type (matching what the user's actual session writes). Existing "ignores tool_uses for tools other than Task" test renamed to "...other than Task/Agent".

Upgrade (cache-busting required)

/plugin marketplace remove wisp-agentdiff
/plugin marketplace add Samuel0101010/wisp-agentdiff

Then Update now in /plugin (or uninstall + install with --scope if it was installed in user scope).

After that, dispatch Task(subagent_type: "wisp-agentdiff:wisp-self-test", prompt: "go") and run /review-agents — the new tab should finally show wisp-self-test (or wisp-agentdiff:wisp-self-test), not the hex slug.