Repository navigation
refactor(harness): tidy loop lifecycle seams and add a live turn-snapshot test - #109
Merged
Merged
Conversation
- A committed turn is `{ messageId, reason }` or nothing; `needsContinuation`
was always `reason === "toolUse"`, so it is gone from `Hooks.Completed`.
- Docs that still said plugin setup and config run per exchange now say per
turn, including the plugin SDK's shared-context docs.
- New loop tests: a `prepareNextTurn` snapshot reaches the next request, with
a steer queued while it ran; `prepareRequest` sees promoted input and does
not promote a steer queued during it; `continue` after a tool batch adds no
request; `end` skips next-turn preparation.
- Comments and test names describe behaviour without naming other projects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One real tool chain per provider: the first tool edits the host settings file and unlocks a second tool, and the very next request of the same run must carry the new header revision and the new tool. The copilot settings test now names gemini-3.8-flash, since models.dev no longer lists 3.6. Co-Authored-By: Claude Opus 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.
Follow-up review of #108 (loop lifecycle seams). No behaviour change in the loop.
Loop
{ messageId, reason }or nothing.needsContinuationis gone fromHooks.Completed, since it was alwaysreason === "toolUse".Docs
context.ts,plugin.ts).util/module.tsstays.Tests
prepareNextTurnsnapshot reaches the next request, along with a steer queued while it ran;prepareRequestsees promoted input, and a steer queued during it waits for the next turn;"continue"after a tool batch adds no request;"end"skips next-turn preparation.runner.turns.live.test.ts. In one real tool chain, the first tool edits the host settings file and unlocks a second tool. The very next request of the same run must carry the new header revision and the new tool, and the reply must contain the second tool's token. It passes on openai, openai-codex, anthropic and OpenRouter (deepseek, gemini, muse), with one artifact per provider.settings.llm.test.tsnow usesgithub-copilot/gemini-3.8-flash, since models.dev no longer lists 3.6.Verification
vp checkandvp run typecheckpass.🤖 Generated with Claude Code