Skip to content

fix: read the judge's reply in either shape $.model.complete resolves - #6

Merged
wasd96040501 merged 1 commit into
mainfrom
fix/model-complete-reply
Sep 23, 2026
Merged

wasd96040501 merged 1 commit into
mainfrom
fix/model-complete-reply

Conversation

@wasd96040501

Copy link
Copy Markdown
Owner

What this fixes

On Claude Code 2.1.280, taskcut 0.8.0 never compacts. $.model.complete now resolves { isAnswered, text, usage } (or { isAnswered: false, reason, ... }) instead of the reply's text. taskcut passed that object to saysDone, which threw; the catch turned every judgement into "not finished" and logged it only to the debug log.

The reply is now taken as unknown and read by readReply in hooks/judge.ts, which knows both shapes — the text 2.1.278 resolved and the result 2.1.280 resolves — and treats anything else as no reply. A failed call is logged with its reason.

claude plugin validate does not catch this; tsc against types regenerated on 2.1.280 does. docs/compatibility.md records it.

How it was tested

  • make validate passes, tsc clean against 2.1.280 declarations
  • readReply unit tests: both shapes, and odd inputs (undefined, null, {}, { isAnswered: true } without text, ...) read as no reply
  • Claude Code version tested against: 2.1.280 in real sessions (the judge bench and mechanism check on feat!: compact when the work moves on, not when a piece is finished #5 run through this code); 2.1.278's shape by unit test only

Independent of #5, which builds on it.

https://claude.ai/code/session_01Hy8i9XZbHT6uPuVZwAP8vT

On Claude Code 2.1.280 $.model.complete resolves { isAnswered, text, usage }
instead of the reply's text. taskcut passed that object to saysDone, which
threw; the catch turned every judgement into "not finished" and logged it only
to the debug log, so nothing was ever compacted. tsc against the regenerated
types reports it; claude plugin validate does not.

The reply is now taken as unknown and read by readReply, which knows the text
2.1.278 resolved and the result 2.1.280 resolves, and treats anything else as
no reply. A failed call is logged with its reason.

Claude-Session: https://claude.ai/code/session_01Hy8i9XZbHT6uPuVZwAP8vT
@wasd96040501
wasd96040501 merged commit 2ae480d into main Sep 23, 2026
3 checks passed
@wasd96040501
wasd96040501 deleted the fix/model-complete-reply branch September 23, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant