Repository navigation
receive loop: hold a conversation answered none or paused until a newer message (1.5.1) - #34
Merged
Merged
Conversation
…er message (1.5.1) After a could-not-process report answered `none` or `paused`, the loop ran the conversation again on its next cycle, on the same input, and it failed the same way every time. The loop now holds it at the anchor it reported: no cycle runs or gates it while its card shows that anchor (an `unanswered` re-wake does not lift it), and a run or turn of it at that anchor does not start, whether it waited for a slot or was decided before the answer came. A newer message, or the card leaving a complete tray, ends the hold. A failure reported on another conversation's completion now holds its conversation until the answer, as one reported at its own end did: a freed slot no longer starts it on the input the answer is about. Status lists the held conversations; patch release 1.5.1.
sanctrl
enabled auto-merge (squash)
November 20, 2026 13:17
…or its report The end of a settle read the tray again whenever a cycle had left any card out (a running turn's included). It now wakes only when a cycle left a card out because that card's report was out, so it can never become a wake for cards a running turn holds.
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 changes
When an agent's AI cannot process a conversation and the server answers the kit's could-not-process report with
noneorpaused,integration.ReceiveLoopused to run that conversation again on its next cycle on the same input. The trigger could be a message in any conversation, a wake frame, a reconnect, a wake the integration heard, or a turn's end. The run failed the same way and sent the same messages to the model every time. The loop now holds the conversation at the anchor it reported (a failed message is not redelivered; new messages flow):unansweredre-wake does not lift the hold. An action this release does not know is read asnone, as the TypeScript client reads it.paused, any). One decided before the answer came is checked again when it starts. A turn already under way that ends silent there does not lift the hold.retry. A verdict or mark-read that takes the card off a complete tray ends it too.Gate-call mode: a failed turn waiting for evidence that another turn's end reports on is now held from that end until the settle is done. No cycle gates it meanwhile, and a turn of it waits for the answer, including one launched with a slot free. Before this, the freed slot could start it on the input the answer was about.
Status:
status().held_after_failurelistsconversation_id,anchor,sinceandreason, so integrations' status/doctor can say "not retried until a new message arrives".counters["starts_held"]counts the turns not started because of a hold.CycleSummary.held_after_failurecounts the cards a cycle left out.The new fields have defaults. Existing fields are unchanged.
Version
1.5.1inpyproject.tomland_version.py(a patch: it fixes existing behaviour, perVERSIONING.md), with a CHANGELOG section## [1.5.1] — 2026-11-20. The README is updated. No tag is created here: publishing is the separate, approved release step.Verification
ruff check src testsclean;mypyclean;pytest1084 passed, 2 skipped on Python 3.9 and again on 3.10 (15 new could-not-process tests);scripts/check-contract-fixtures.shmatches the published contract. The new tests cover:noneheld through a message elsewhere, a wake frame, anunansweredre-wake and a reconnect over the socket while the other conversations keep running, with a newer message lifting the hold and the next failure gettingretry; a waiting turn that waits for the answer (nonedrops it,retrystarts it once);paused; a card read meanwhile, and a truncated tray proving nothing; gate-call mode (reply turns and single-card gate calls); the gate-call start-time races; a newer-anchor turn kept onnoneand dropped onpaused; a silent turn under way not lifting the hold; an invite turn's end; report errors holding nothing; and the pacer's bounds and read ordering. The new tests fail against the 1.5.0 loop.Also in this PR: the contract v1 fixtures copied byte for byte from the published contract (manual 2.4.1), the established fixture-only commit; the conformance check passes.
Risk and rollback
The risk is a conversation held when it should run. The hold never covers new input: a newer message, the card leaving a complete tray, a
retry/hiddenanswer, or a restart ends it. A server that predates the route answersnone, so on such a server a failure with evidence now holds the conversation until a new message arrives, where before it ran again on every cycle. The server answers the route today. Rollback: revert this PR, or stay on 1.5.0. There is no wire, storage or server change.