Skip to content

feat(agent-tools): let a verified hc pane call other agents without a consent card - #4679

Merged
devswha merged 10 commits into
mainfrom
feat/hc-pane-no-consent-card
Nov 25, 2026
Merged

devswha merged 10 commits into
mainfrom
feat/hc-pane-no-consent-card

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What

A pane hc started on this PC (no Ovis token) that passes the kernel proof (server/agent-tools/pane-proof.ts, unchanged: SO_PEERCRED/SO_PEERPIDFD, parent walk, hc's live panes) now gets the agent tool on its first call, with no "Give … the tool to call other agents?" card. The per-pane allow/deny state, the answer/remove routes, the agent-tool-panes feed, the card component and the Settings allowed-pane rows are removed. The pane's run still ends when the pane closes, its root process changes, or the switch leaves start. Other PCs and every child's own approval cards are unchanged.

Part B of the owner-approved delegation convenience package (2026-11-25). The only UI change is the removal of that card and of the allowed-pane rows in Settings → Agents, which the package covers.

Tests

  • server/agent-tools/pane.test.ts: the first start from a proven pane now starts the child (failed with approval_required before); the old card/allow/deny cases are rewritten to the new behaviour; proof failures (process outside every pane, another pane's hint, Ovis-launched pane) still answer not_granted.

Validation

  • bun run check fast on the branch: typecheck, build, generated files ok; unit 27944 pass, 2 fail: server/ssh-account-add.test.ts and scripts/plugin-tui.test.ts, the environment failures this machine shows on every branch (long TMPDIR socket path, .env HOME fallback).
  • Focused: pane/agent-tools tests 258 pass; typecheck ok.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • When agent calls are enabled, a verified local pane can start an agent without a separate confirmation. Child agents’ permission requests still require human approval.
  • Changes
    • Pane-by-pane approval cards and management controls are no longer available.
    • Calls from unverified processes or unsupported machines are rejected.

Verified local panes can start agent calls without a separate pane grant while local starts are enabled. Pane runs are bound to pane and process identity and reconciled across lifecycle changes. The change removes pane-grant routes, UI, and events. Child permission requests still require human approval.

Changes: Verified Pane Agent Calls

Layer / File(s) Summary
Persist pane runs
server/agent-tools/runs.ts
RunStore stores pane keys with shared run state, validates pane records, reuses matching runs, and reconciles known runs against live pane and process identity.
Authorize verified pane calls
server/agent-tools/hub.ts, server/agent-tools/pane.test.ts, server/index.ts
AgentToolHub proves the caller’s pane and authorizes calls while starts remain enabled and the pane run and process identity remain valid. Tests cover concurrency, child approvals, persistence, identity checks, and lifecycle and settings changes.
Remove pane-grant flow
server/agent-tools/launch.ts, server/agent-tools/pane-grants.ts, server/agent-tools/pane-routes.ts, server/dispatch*.ts, server/machine-*.ts, shared/harness-tool.ts, shared/machines.ts, src/App.tsx, src/components/Agent*, src/lib/agentToolPanes.ts, src/lib/api.ts, src/lib/i18n/*, src/lib/useMachineRoster.ts
The server, client, and machine-event interfaces no longer expose pane-grant routes, state, cards, removable pane rows, or pane-grant events. Agent-call permission toggles and other pairing events remain.
Update pane-call contracts and guidance
changelog.d/hc-pane-delegation.md, docs/harness-contract.md, docs/harness-tool.md, scripts/plugin-agent.ts, shared/harness-contract.schema.json, shared/harness-skill.ts
The harness contract and schema remove approval_denied. Guidance and the changelog describe verified pane calls without a separate grant and retain the requirement for human approval of child permission requests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Merge Risk: Low · previous review 2a6c3 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a verified hc pane can call other agents without a consent card. The changeset removes the consent card, per-pane allow/deny state, and the answer/remove routes, and a…
Description check Passed The description follows the template's two sections. The Change section explains the behavior, the removed card and routes, and the unchanged scope (other PCs, child approval cards, run lifecycle). Th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a verified hc pane can call other agents without a consent card. The changeset removes the consent card, per-pane allow/deny state, and the answer/remove routes, and adds first-call start for proven panes. The title is specific and matches the primary behavior change. It uses the conventional feat(scope) prefix, which is acceptable.

Full details: Description check

Explanation

The description follows the template's two sections. The Change section explains the behavior, the removed card and routes, and the unchanged scope (other PCs, child approval cards, run lifecycle). The Validation section lists the commands run with results, names two failing tests with their environment cause, and gives focused test counts. It does not link an issue for the feature, which the template asks for. It also has no explicit HTTP/WS contract-test coverage note even though the removed routes are HTTP endpoints. The changelog entry in changelog.d is part of the PR but the description does not mention it.

Resolution

Consider adding a link to the issue or maintainer approval for the feature, a note on contract-test coverage for the removed HTTP routes (agent-tools/panes/answer and remove), and a mention of the changelog.d entry.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4149427 and 2a6c37b.

Files ignored due to path filters: 1

  • shared/harness-contract.generated.ts is excluded by !**/*.generated.*
Files selected for processing: 31

  • changelog.d/hc-pane-delegation.md
  • docs/harness-contract.md
  • docs/harness-tool.md
  • scripts/plugin-agent.ts
  • server/agent-tools/hub.ts
  • server/agent-tools/launch.ts
  • server/agent-tools/pane-grants.ts
  • server/agent-tools/pane-routes.ts
  • server/agent-tools/pane.test.ts
  • server/agent-tools/runs.ts
  • server/dispatch-routes.ts
  • server/dispatch.ts
  • server/index.ts
  • server/machine-api.ts
  • server/machine-events.ts
  • server/machine-pairing-events.ts
  • shared/harness-contract.schema.json
  • shared/harness-skill.ts
  • shared/harness-tool.ts
  • shared/machines.ts
  • src/App.tsx
  • src/components/AgentCallsRows.tsx
  • src/components/AgentToolPaneCard.css
  • src/components/AgentToolPaneCard.tsx
  • src/lib/agentToolPanes.ts
  • src/lib/api.ts
  • src/lib/i18n.test.ts
  • src/lib/i18n/setup.ja.ts
  • src/lib/i18n/setup.ko.ts
  • src/lib/i18n/setup.zh.ts
  • src/lib/useMachineRoster.ts
Files with no reviewable changes: 11

  • server/agent-tools/pane-grants.ts
  • server/agent-tools/pane-routes.ts
  • shared/harness-tool.ts
  • src/App.tsx
  • src/components/AgentToolPaneCard.css
  • src/components/AgentToolPaneCard.tsx
  • src/lib/agentToolPanes.ts
  • src/lib/api.ts
  • src/lib/i18n/setup.ja.ts
  • src/lib/i18n/setup.ko.ts
  • src/lib/i18n/setup.zh.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.

@devswha
devswha merged commit 22abe50 into main Nov 25, 2026
21 checks passed
@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head e28620860. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

Owner approved the convenience package (2026-11-25); the only UI change is the removal of the hc pane consent card and the allowed-pane rows, which the package covers. CodeRabbit did not review this head (limit). Reviews: omo gate reviewer (BLOCK: Ovis-launched OpenCode TUI admitted as a tokenless pane HIGH, revoked pane run revived after a failed write HIGH, upgrade drops a live pane's run MEDIUM, stale pane-grants.json MEDIUM, demo routes LOW) and Codex gpt-6.2-sol-fast xhigh adversarial review (CLEAR; same two MEDIUMs plus LOWs); all fixed in 9784157. Browser regression failures on this head were runner flakes (pending-pane-switch passed locally on this head; reruns passed).

@devswha
devswha deleted the feat/hc-pane-no-consent-card branch November 25, 2026 13:51
devswha added a commit that referenced this pull request Nov 25, 2026
…ts answer their questions (#4721)

## What
Parts C and D of the owner-approved delegation convenience package
(2026-11-25), bundled into one PR per the lane's PR limit (same area:
server/agent-tools, server/acp, crates/acp-keeper). Stacked on #4679; it
retargets to main once #4679 merges.

**C. Children start in their harness's own default mode, at any
version.** The ask-for-everything launch recipes and their version pins
are gone; a child launches with the person's own settings in that
agent's ordinary default mode, and `session.version` reports the version
found in the child's own folder and environment (prerelease suffix
kept). Wider modes are refused: Claude is opened in `default` (refused
in `auto`, `acceptEdits`, `bypassPermissions`), agy in `default`,
Copilot refused when its `allow_all` option is on
(`COPILOT_ALLOW_ALL=false` at launch), GJC launched with its default
`prompt` permission mode instead of an inherited blanket setting; the
mode and `allow_all` are checked again right before the child is
registered and at every prompt. Tasks starting with `/` stay refused;
cards stay one-time; depth, time and rate limits unchanged.
docs/harness-tool.md lists, per harness, the default mode and what it
lets run without a card.

**D. A child's question goes to its parent agent first.**
`wait`/`result`/`read` show `waiting_parent` with the question and
choices as untrusted data; the parent answers with `agent_answer` /
`ovis agent answer`, or says it does not know; after that or 30 s the
question becomes the person's card and a late parent answer is refused.
Approvals never reach the parent: permission requests, Claude
confirmations (model switch, download), GJC forms (cannot be told apart
from consent) and Codex secret input stay person-only, and person cards
now keep the real choices. `agent_answer` applies the same
mode/`allow_all` check as `send`, and stop cancels a pending question
(never answers it). Question flow modelled on T3 Code's
DelegatedTaskQuestionReactor (MIT).

## Reviews
Gate reviewer + Codex gpt-6.2-sol-fast xhigh adversarial review on each
part before stacking; findings fixed in one round each (C: 3f32a1889 →
rebased; D: 6de4d476d → rebased).

## Validation
- `bun run check fast` on this head: typecheck, build, generated files
ok; unit 27958 pass, 2 fail (`server/ssh-account-add.test.ts`,
`scripts/plugin-tui.test.ts`: this machine's environment failures, same
on main).
- Focused: server/agent-tools, server/acp, server/approvals 310 pass;
`cargo test` acp-keeper 40 pass; release keeper built.
- Real parents (isolated herdr-core, Claude Code and omo in a tokenless
hc pane) → OpenCode/Codex/agy children, same task before and after the
package: human cards 8 → 0 (agy failed to open an ACP session both
before and after; no question was raised in this task).

---------

Co-authored-by: sisyphus-dev-ai <[email protected]>
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.

1 participant