Skip to content

feat(discussion): independent read-only reviewer participants for agent-started discussions - #715

Merged
ajianaz merged 1 commit into
developfrom
feat/discuss-child-participants
Nov 14, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/discuss-child-participants

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

The model-facing discuss tool takes an optional modes array (one entry per participant, in order): inline (default, as today) or reviewer. A reviewer runs as its own child process. The owner's tole discuss is 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; /approvals belongs 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 in automation-design.md, not weaker.

Changes

  • discuss_tool: modes is 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.
  • Reviewers are wired through DelegateIndependent, now Delegator::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 for delegate.
  • Read-only launch: --plan-mode (no Write tool exists), an empty allow list (the profile's patterns are not carried over), and TOLE_DISCUSSION_PARTICIPANT=1 in the child environment. delegate_report stays as its only Write tool (one capped file, its contribution), kept in plan mode by keep_read_only in tool_roster.
  • No nested discussions: Delegator::for_session returns no host for a session with the participant marker, so neither discuss nor delegate is registered, at any depth.
  • Docs: 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-features pass.

New tests, each mutation-checked (the mutation fails the named test):

  • read-only launch (--plan-mode, empty allow, only delegate_report allowed, marker in env): removing the flag, the env var, the empty-allow rule or the node-derived participant flag fails a_participant_child_launches_read_only_...; child_env round trip.
  • an ordinary delegate child is not a participant (restrictions hang on the participant task only).
  • marker required by consult_participant; carve never exceeds what is left.
  • a_discussion_participant_gets_no_delegation_host (removing the for_session refusal fails it).
  • modes closed enum and length, other spellings stay unknown fields, schema enum (removing the length check, the enum check or the field fails modes_are_a_closed_enum_...).
  • reviewer is a read-only consult child of the caller's goal within its budget (ignoring modes fails 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

…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.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 7b0e906 into develop Nov 14, 2026
23 checks passed
@ajianaz
ajianaz deleted the feat/discuss-child-participants branch November 20, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants