Skip to content

Design: Subagent permission surfaces and implementation agents #52

Description

@Astro-Han

Context

#49 / #51 added the first foreground read-only subagent foundation: a parent agent can spawn a child run, the child has its own runtime ledger, and the parent can inspect results through agent projection tools.

That is a useful spine, but the next step should be shaped before another implementation PR. Subagents are not one capability. They likely need several permission profiles and product modes.

Why this issue

We need one focused place to discuss the subagent surface before continuing:

  • read-only local exploration
  • web research subagents
  • implementation subagents that can edit in an isolated boundary
  • how agent_* tools are exposed to the parent model
  • when a child can prompt, block, or continue without UI approval

The design filter stays the same: simple enough, elegant enough, reassuring enough.

Immediate candidates, not yet final decisions

Two cleanup ideas came out of the first read-only pass:

  1. Put agent_spawn, agent_list, and agent_output behind a deferred agent tool group.

    • This is prompt/surface economy, not a permission boundary.
    • It may reduce accidental spawning and keep the always-on tool surface smaller.
  2. Revisit whether read-only child agents should have raw Bash.

    • Current child toolset includes Bash, Read, Glob, Grep.
    • Current policy blocks shell_unsafe in explore, but allows shell_safe through a command classifier.
    • Without OS/worktree sandboxing, classifier-based shell safety may not be reassuring enough for a feature labeled read-only.
    • Possible outcomes: remove Bash; keep only Read/Glob/Grep; introduce structured read tools; or keep Bash only after a stronger sandbox exists.

These are likely small PR-sized improvements, but they should not be treated as the whole subagent roadmap.

Open questions

1. Read-only local agents

What is the minimum useful local read-only toolset?

Options to discuss:

  • Read / Glob / Grep only
  • add structured read helpers such as git_status, git_diff, list_dir
  • keep safe Bash with tighter classification
  • keep Bash only when a real OS/worktree sandbox enforces read-only

Key invariant to preserve: a read-only child should not park on a permission prompt that no UI can answer.

2. Web research agents

Some research tasks need many subagents doing web search in parallel. That is different from local read-only exploration.

Questions:

  • Should web research be a separate subagent profile from local read-only?
  • Is web_read allowed by default for a web-research child, or does the parent/user approve the profile once?
  • How do we prevent web research children from gaining local write/shell/network-send capability?
  • What should the parent see: only summaries, citations, full traces, or all tool events?

3. Implementation agents

Implementation subagents are a separate capability, not just read-only agents with more tools.

Likely shape to discuss:

  • run in isolated worktree or sandbox
  • allow edits only inside that boundary
  • return diff, changed files, artifacts, tests, and summary
  • parent/user decides whether to apply changes
  • no silent mutation of the parent checkout

Questions:

  • Does implementation child need ask mode, execute mode, or a dedicated profile?
  • How are approvals routed if the child needs a risky tool?
  • What is the rollback/apply contract?
  • Should nested subagents wait until implementation v1 is stable?

4. Parent-facing agent tools

Current parent-facing tools are:

  • agent_spawn
  • agent_list
  • agent_output

Questions:

  • Should they move into a deferred agent group?
  • Should agent_spawn eventually accept a profile such as local_read, web_research, or implementation?
  • Should agent_list and agent_output stay always-on because they are read-only projections, or move with agent_spawn for conceptual grouping?

Non-goals for the next PR

  • Do not build the full implementation agent until its boundary is shaped.
  • Do not introduce nested subagents by default.
  • Do not treat deferred tools as a security boundary.
  • Do not rely on prompt text alone for read-only guarantees.

Possible next split

After discussion, this may split into separate PRs:

  1. Read-only subagent surface cleanup: deferred agent group plus local read-only child toolset hardening.
  2. Web research subagent profile: explicit network-read-only child mode with citation/trace expectations.
  3. Implementation subagent v1: isolated patch-producing worker with apply/review gate.

The exact split should follow from the permission model, not the other way around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions