Repository navigation
feat(discussion): independent read-only reviewer participants for agent-started discussions - #715
Merged
Merged
Conversation
…nt-started discussions (#704) discuss takes an optional modes array (inline or reviewer per participant). A reviewer is a consult child under the rules of delegate, launched read-only: plan mode, an empty allow list and a participant marker in its environment, so it cannot start a discussion or delegate. A Write it wants is denied until #714.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 15, 2026
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 model-facing
discusstool takes an optionalmodesarray (one entry per participant, in order):inline(default, as today) orreviewer. A reviewer runs as its own child process. The owner'stole discussis unchanged.Why
Follow-up of #701 (#704, parent #583). Seating participants that hold tools needs rules the inline voices never needed. The owner's approval surface for a delegated child's Write does not exist yet (a headless child has no approver;
/approvalsbelongs to serve sessions), so it is filed as #714. Until then a reviewer is strictly read-only: a Write it wants is denied (fail closed), never routed to the caller's allowlist. This is stricter than the decision inautomation-design.md, not weaker.Changes
discuss_tool:modesis a closed enum (inline|reviewer), one entry per participant; a bad value, a wrong length or any other spelling (mode,reviewers,independent, ...) is refused before anything is carved or started. All other unknown fields are still refused.DelegateIndependent, nowDelegator::consult_participant: same seat rule as every participant (the caller's allow list covers the profile's), budget carved from the caller's remaining budget (never added; the discussion also counts the child's spend, so it is charged twice, which only over-counts), depth cap, live-process limit, machine guard and leases as fordelegate.--plan-mode(no Write tool exists), an empty allow list (the profile's patterns are not carried over), andTOLE_DISCUSSION_PARTICIPANT=1in the child environment.delegate_reportstays as its only Write tool (one capped file, its contribution), kept in plan mode bykeep_read_onlyintool_roster.Delegator::for_sessionreturns no host for a session with the participant marker, so neitherdiscussnordelegateis registered, at any depth.docs/automation-design.md,CHANGELOG.md(0.11.0 / Added),docs/epics.md.Testing
fmt, clippy
--workspace --all-targets --all-features -D warnings,cargo test --workspace, and tole-core / tole-cli--no-default-featurespass.New tests, each mutation-checked (the mutation fails the named test):
--plan-mode, empty allow, onlydelegate_reportallowed, marker in env): removing the flag, the env var, the empty-allow rule or the node-derived participant flag failsa_participant_child_launches_read_only_...;child_envround trip.delegatechild is not a participant (restrictions hang on the participant task only).consult_participant; carve never exceeds what is left.a_discussion_participant_gets_no_delegation_host(removing thefor_sessionrefusal fails it).modesclosed enum and length, other spellings stay unknown fields, schema enum (removing the length check, the enum check or the field failsmodes_are_a_closed_enum_...).modesfails it); the seat rule applies to reviewers; inline default starts no child.plan_mode_keeps_only_the_report_tool_of_a_delegated_child.Refs #704