SIGN IN SIGN UP

feat(deepagents): make todo middleware opt-in (#708)

## Summary

Makes `todoListMiddleware` opt-in. Default agents and default subagents
no longer expose `write_todos` or the `todos` state channel, reducing
the default tool surface while preserving explicit opt-in.

## Changes

- Remove default todo middleware from the main, general-purpose, and
declarative subagent stacks.
- Preserve opt-in support through `middleware: [todoListMiddleware()]`;
declarative subagents opt in through their own middleware.
- Remove `write_todos` from always-present tool typing and built-in
name-collision handling.
- Update state and subagent documentation plus shared runtime assertions
for the optional todo state/tool.

### Harness profiles and coverage

- Re-add todo middleware in the Codex harness profile because its
model-specific prompt requires `write_todos`
- Apply profile `extraMiddleware` to subagent stacks, with profile
factories creating fresh instances per stack.
- Add coverage for default exclusion, explicit opt-in,
main/GP/declarative isolation, profile middleware propagation, and type
inference.
H
Hunter Lovell committed
1225a7ff8673686c2a3c0411636a9511b7d8d0d0
Parent: 71000c0
Committed by GitHub <noreply@github.com> on 7/24/2026, 10:40:43 PM