Repository navigation
Conversation
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.
Fixes #156
Cursor's
stophook reports how the turn ended instatus:completed,abortedorerror. The adapter ignored it, so with the verify reminder on, a turn that ended any way at all got afollowup_messageif the recalled check had not run since the last edit. Cursor sends that message as a new user message, so pressing Stop in the middle of a turn started the agent again with "Run it once before finishing", which is exactly what the user had just said not to do. A turn that died on an error was restarted the same way.The adapter now reads
statusand only treats acompletedstop as one that may be followed up. Anabortedorerrorstop still ends the turn and still queues ingest as before, it just never gets a reminder. A stop with nostatuskeeps the old behavior, so older Cursor builds are not affected. Because no reminder is shown on a stopped turn, the injection is not marked as reminded, so if the user carries on and the next turn completes without running the check, the reminder shows up then.The change is limited to the Cursor adapter. It reuses the existing
continuedflag on the turn end, which is what already suppresses a second reminder afterloop_countgoes above zero, rather than adding a new kind of turn end that every other agent would have to handle.To reproduce, I built the binary, pointed
TRODDEN_HOMEat a scratch directory with the verify reminder on, a procedure whose check isnpm testand an injection for the conversation, and piped real Cursor hook payloads intotrodden hook cursor: anafterFileEdit, thenstopwithstatusset toaborted,errorandcompletedin turn. Before the fix theabortedstop printed afollowup_message. After the fix theabortedanderrorstops print nothing and the followingcompletedstop prints the reminder. A new test checks thatabortedanderrorstops never render a reminder (it fails without the fix), and the existing stop test now also covers a stop with nostatus.