Repository navigation
Let the assistant read the panes it launched, and stop teaching handback on commands - #13445
Merged
gregpriday merged 5 commits intoOct 16, 2026
Conversation
…iew check says - terminal.readLastMessageOwned from the help assistant admits a pane this session's ledger created, as every other session's read does; the pinned-view check is asked only about panes it did not create - a hand-over still never admits this read - each pinned-view refusal logs which side refused (view workspace, unwired, not in the workspace, view changed, lookup failed), since the refusal the assistant sees is uniform
- Common Tasks no longer shows handback on launchMany and sendCommandMany - a slash command or skill takes no handback, since its instruction would join the arguments; its marker or screen shows the end, and an earlier stop is no reason to nudge - without handback a notice fires once per arm, so re-arm terminal.notifyWhenIdle when the agent resumes - both prompts stay under the 8,100-byte ratchet (8,050 and 8,096 bytes)
…reads in work-batch - daintree.orchestration.work-in-waves owns the rounds, with daintree.foundation for the mechanics; the search stays as how they load - branch prefix and slug come from one gh issue view --json labels,title and two jq reads, never IFS read over @TSV, which collapsed an empty labels field into feature/issue-<n>-
…ule in work-batch - Common Tasks says a sentence takes handback and a slash command or skill none, and qualifies waitForReply as the short wait; still byte-neutral (8,050 and 8,096 bytes) - the work-batch skill follows what its one runbook search selects, takes the rounds from itself when work-in-waves isn't among them, and no longer claims an older catalog from a missing result - a title with no ASCII letters or digits gets the slug untitled - test that a hand-over never admits the assistant's read, and correct two comments that still described the view as the whole boundary
…s working - terminal.notifyWhenIdle arms only while the target reads working, so Common Tasks says so instead of 'when it resumes' (8,053 and 8,099 bytes) - the read gate comment no longer says other owned tools use the ledger alone; several accept a hand-over
gregpriday
marked this pull request as ready for review
October 16, 2026 15:02
gregpriday
deleted the
feature/issue-13439-tighten-the-work-batch-skill-and-stop
branch
October 16, 2026 15:10
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.
Summary
terminal.readLastMessageOwnedwent only by pinned-view membership and ignored the ownership ledger, so when that check answered no for a pane it had launched (as it did three times in the 2026-10-16 batch drain), the read was refused even thoughterminal.listandterminal.closeworked. A pane this session created is now admitted by the ledger, as every other session's read is; the view check is asked only about panes it didn't create, and a hand-over still never admits this read.no-view-workspace,unwired,not-in-workspace,view-changed,lookup-failed), with the session and terminal ids only. The transcript, the audit ring and the main log didn't say which part of the check failed in that run, so the next one will.handbackon every launch and send. A slash command or skill takes nohandback, since Daintree's instruction would join its arguments; its marker or screen shows the end, and an earlier stop is no reason to nudge. Withouthandbacka notice fires once per arm, so the assistant re-armsterminal.notifyWhenIdleonce the agent readsworkingagain, the only state it arms in.daintree.orchestration.work-in-waves(fix(runbooks): teach a user's own batch workflow in merge-gated waves assistant-backend#156) as the runbook that owns its rounds instead of asserting what its search query selects, and gives the exactgh issue view --json labels,titleplus twojqreads for branch names. Splitting@tsvwithIFS readcollapsed an empty labels field and producedfeature/issue-13382-.Resolves #13439
Changes
sessionServer.ts: the ownership gate computes the ledger record for every origin; for the assistant's read the view is consulted only when there is none. Adoption is still excluded for this read.httpLifecycle.ts:isTerminalInPinnedWorkspacelogs a reason code on each refusal through a newmain:McpPinnedViewlogger.scripts/assistant-src/SHARED.tasks.md→ regeneratedassistant/CLAUDE.mdandassistant/AGENTS.md. The Common Tasks lines were tightened to pay for the new guidance: both files stay under the 8,100-byte ratchet (8,053 and 8,099 bytes, four above where they were). Sentence prompts keephandback: true..daintree/assistant/.claude/skills/work-batch/SKILL.md: runbook ownership and the branch-name commands. Teardown is unchanged.One review finding I left alone: a closed pane's ledger record isn't released by
terminal.close, so a pane another project later launches under the samerequestedIdwould be readable by this help session. Reaching it takes a plugin choosing that exact id, plugins are unsandboxed anyway, and the assistant has shell access to the same transcripts, so the pinned view is a scoping policy rather than a security boundary here. Every other session already reads by this ledger.Testing
sessionServer.test.ts: the help and assistant-pane origins read a pane they created while the view check refuses, without asking the view; a pane they didn't create is still refused when the check is unwired; a hand-over is never admitted, including with the view refusing (this test fails if the adoption guard is removed).httpLifecycle.test.ts: each refusal logs its reason once, and an admission logs nothing.build-assistant-prompts.test.mjs: both prompts keephandbackfor sentences, drop it for commands and skills, carry the re-arm and no-nudge rules, and stay under the size ratchet.sessionServer,httpLifecycle,terminalStatus,build-assistant-promptsandhelpSessionProjectMetadata;check:assistantreports no drift; Prettier and ESLint are clean on the changed files (the remaining warnings are on lines this PR doesn't touch). A scoped typecheck of the changedelectron/files is clean.jqreads were run against an unlabelled issue, abuglabel among others, a missing labels key, punctuation, non-ASCII and emoji-only titles, and titles over 40 characters.