Skip to content

Delegate self-contained tasks to subagents #136

Open

Description

@hakula139

Goal

Let the model delegate a bounded task to a subagent with its own context, tools, model, and effort. The subagent returns a report, so search-heavy or parallel work does not flood the main context.

Acceptance criteria

  • Subagent definitions (name, description, tools, model, effort, and prompt) load from user and project directories in the package format defined by the extensibility epic (Epic: Extensibility through hooks, skills, agents, and packages #157).
  • The parent receives only the final report, and the subagent's tool calls pass through the same permission gate.
  • Several subagents can run concurrently, and cancelling the parent turn cancels them all.
  • An isolation: "worktree" option runs a writing subagent in its own git worktree and reports the worktree path and branch with the result.
  • Configurable limits bound concurrent subagents, nesting depth, and wall-clock time per subagent. Their defaults are 8, 3, and 30 minutes, respectively. A call that exceeds a limit returns an error to the model.
  • Cost and token usage are included in the session totals.
  • Agents whose definitions set memory get their own memory directory under the project memory directory from Keep a memory directory for each project #171, added to the workspace roots, and tests cover it.

Notes

Subagents reuse the agent execution core from #168.

Per-agent memory moved here from #171, which provides the project memory directory it nests under.

Each subagent persists as its own session in the session store from #729, linked to its parent by a parent session column that an additive schema revision adds.

Activity

  1. self-assigned this
    on Oct 15, 2026
  2. added
    enhancement
    area: agent
    design
    on Oct 15, 2026
  3. added this to the v0.1.0 milestone on Oct 15, 2026
  4. hakula139 commented on Oct 28, 2026

    @hakula139
    MemberAuthor

    Persistence note added to the description: subagent sessions go into the session store from #729, linked to their parent by a column an additive schema revision adds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: agentdesignenhancement

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions