Repository navigation
Conversation
…nput An install restarts the OpenCode plugin, and the new instance has seen no event of a session that was already resting: its own session list is empty and its 5 s tick starts only after the first turn, so a resting window held its peer messages until someone typed once. Narrowed form (a) of the closed #2006: the instance arms its existing tick at its start, and inside that tick, when the pending folder's time moved, the new read-only `peer-message.py pending --recipients` names the sessions a message waits for. Each root session of this directory (the existing foreign, child and worker checks) that answers `wait` joins the instance's own `sessions` with its status filled; sending, completion and watch wake stay with the existing tick and its own idle check. No retry state, key, claim rule or second delivery path is added. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
The narrowed form (a) of the closed #2006: a resting OpenCode window that was open across an install receives peer messages without anyone typing in it first.
Cause. An install changes the OpenCode config, so OpenCode starts the Hearting plugin again. The new instance has seen no event of a session that was already resting, so its own
sessionslist is empty, and its existing 5 s tick starts only after the first turn (env()). The window staysnative-pending("input not settled, type once") until someone types.Change (existing path only, +60 net production lines).
arm()is the old timer block, moved into a function).peer-message.py pending --recipientsnames the sessions a message waits for (cap 32, no keys).session.waitjoins the instance's ownsessionswith its status filled.deliveryas before.Not brought back from #2006:
peerRetry, keys, skip limits,truncated/gone,claim-held, transient-failure classes, a new claim rule. A listing that failed is simply asked again on the next tick; a busy session joins by its own nextsession.idle.Tests
opencode_v2_plugin.test.py: a fresh instance (noenv(), no status event) lists once, adopts only the resting root session, sends on the next tick; foreign / child / worker sessions are never read twice nor looked after; zero helper calls while the folder time stands still, one per change; a failed or unreadable listing is asked again.peer_message.test.py:pending --recipientslists only pending rows that resolve to a valid OpenCode session, newest first, capped, and writes nothing.harness_behavior_cases_idle_adopt.py, private tmux, loopback model, throwaway HOME): rest / busy / permission form / another directory's session. The rest scene fails onorigin/mainand passes here.What changes for the user
Known limit: a session that was merely busy at the first look joins by its own next
session.idle, as before.🤖 Generated with Claude Code