Repository navigation
feat(tool): contract v2 with session ids, list and close - #1709
Merged
Merged
Conversation
…tatus/close endpoints - plannotator tool contract v2 (packages/shared/plannotator-tool.ts + mod copy): target accepts a list for annotate, new list/close actions, reply reserved, pn- session ids in results and decision headings, shared list/close texts. - /api/host/status and /api/host/close on the Bun and Pi servers, guarded like the pull bridge; close is the reviewer's Close marked closedBy agent, keeps the draft, and tells the tab over the external-annotation SSE. - Claude Code mod: list/close scoped to the session's own launches, TERM fallback for older CLIs, session ids in tool results and decision turns. - Editor and review app show 'Closed by the Agent' with the unsent count.
…er Plannotator - An older CLI's app page (200 text/html, before the /api/* 404 guard) or a JSON 404 no longer reads as closed; only a JSON answer with a numeric unsentAnnotations does (classifyHostCloseAnswer). - TERM fallback: never on a failed connection; the stop script skips the kill when result.json/exit is already there and when the pid no longer names a plannotator process. - After Claude's close, a decision record without closedBy (or an older CLI's exit 0) is the reviewer's and is delivered, not swallowed. - Engine-harness case for list/close through $.http.fetch (GET, no body). Co-Authored-By: Claude <noreply@anthropic.com>
…e reviewer's comments - /api/feedback and /api/exit answer 409 after the session is decided (a host close included) on Bun and Pi, like annotate, so a tab left open neither deletes the kept draft nor gets ok for feedback nobody receives. - countUnsentDraftComments skips source-tagged entries (review agents, WebMCP, linters) and counts PR description and PR comment notes. - Host control is not tied to the pull bridge: it still answers under PLANNOTATOR_AI=disabled (comments corrected). Co-Authored-By: Claude <noreply@anthropic.com>
…is conversation's reviews - Tab and tool-result copy say the comments are saved as a draft; the tab promises a restore only for the same unchanged document (annotate) or the same changes (code review). - Tool description: list/close cover reviews opened in this conversation, including slash-command ones; the invalid-action error lists "reply". - AGENTS.md: list/close under Version skew with the remaining old-CLI TERM window; host control answers under PLANNOTATOR_AI=disabled; 409 after close. Co-Authored-By: Claude <noreply@anthropic.com>
- Host control turned off (remote mode, no token) answers
404 { code: "host_control_disabled" } in both runtimes; the mod reads it as
turned off, not as an older CLI, and tells Claude to close it from the tab.
- STOP_SCRIPT checks that ps can describe its own pid first; where it cannot
(no procps, BusyBox ps without -p) it signals nothing (exit 6) and the close
says the review was left running.
- AGENTS.md: both cases under Version skew and Host session control.
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Oct 5, 2026
1 task
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.
Part of the 0.29 agent-sessions work (design:
.product/drafts/agent-sessions-0.29/DESIGN.md).What it does
plannotatortool contract v2 (packages/shared/plannotator-tool.ts, plus the mod's copy): annotatetargetaccepts a list, newlistandcloseactions,replyreserved for the comment loop. Results and decision headings carry a session id (pn-…)./api/host/statusand/api/host/closeon the Bun and Pi servers, guarded like the pull bridge (loopback host, no Origin, bearer token). An agent's close works like the reviewer's Close, keeps the draft, and tells the open tab.listandcloseonly see this session's own reviews. Older CLIs fall back to stopping the process, which keeps the draft too.Not in this PR: several files in one review (the server mode), the Pi and OpenCode 2 tool, and the comment loop. Each lands in a later PR.