fix: read the judge's reply in either shape $.model.complete resolves - #6
Merged
Merged
Conversation
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
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
On Claude Code 2.1.280, taskcut 0.8.0 never compacts.
$.model.completenow resolves{ isAnswered, text, usage }(or{ isAnswered: false, reason, ... }) instead of the reply's text. taskcut passed that object tosaysDone, which threw; thecatchturned every judgement into "not finished" and logged it only to the debug log.The reply is now taken as
unknownand read byreadReplyinhooks/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 validatedoes not catch this;tscagainst types regenerated on 2.1.280 does.docs/compatibility.mdrecords it.How it was tested
make validatepasses,tscclean against 2.1.280 declarationsreadReplyunit tests: both shapes, and odd inputs (undefined,null,{},{ isAnswered: true }without text, ...) read as no replyIndependent of #5, which builds on it.
https://claude.ai/code/session_01Hy8i9XZbHT6uPuVZwAP8vT