Skip to content

The manager agent: design (S-223, proposed) - #34

Draft
OpenReplicant wants to merge 9 commits into
mainfrom
claude/manager-agent
Draft

OpenReplicant wants to merge 9 commits into
mainfrom
claude/manager-agent

Conversation

@OpenReplicant

Copy link
Copy Markdown
Owner

A design for a manager agent: a main agent that knows every project, hands work to worker agents, never does the work itself, and stays free to answer. It builds on #32's design (the environment as a kernel module, propose decided in the kernel's review lane, the channel and router as MCP servers), not its code. Nothing is built except one trial script.

What is here

  • docs/manager-agent.md, the design:
    1. The portfolio. env.project, env.worker and env.decision live in the environment module, with a files-only mirror as Backstage entities. Who may write what is enforced by logins and the portfolio server.
    2. The manager. A Haiku session with no built-in tools (--tools '', so no Bash, edits or Agent tool), fed by the channel. A hook caps each turn at 8 tool calls. The document explains why it uses Haiku rather than the local fast model, and how its routing choices can be replayed against fast later.
    3. Workers. They start through pm.start (free) and pm.start_gated (propose). The server picks the gate from the project's class. Runners: local (claude --bg in a worktree) first, then a container (claude -p), Kaggle and scheduled runs. Workers report through one tool, pm_report, with refs and a summary of at most 300 words, never a transcript.
    4. The supervisor. It runs on the host, outside the manager's reach. It applies the actuators and watches the runners: stalls, failures, and usage-limit stops, which it resumes at the reset.
    5. Decisions and the inbox. Gated actions go through the review lane, and questions through an inbox (accept, edit, respond, ignore). You are notified only on transitions. "Done" comes from a judge worker with a clean context (Morphogen).
    6. The UI. desktop/view-manager/ with projects, workers and an inbox (ASCII wireframe). Spend comes from the gateway's meter.
    7. Failure modes, with a guard and a measure for each.
    8. Trial PM-1, with its falsifier.
    9. What is reused and what is new, and the build order with a done-when for each step.
    10. Open questions for the owner.
  • DECISIONS.md: S-223, proposed. The re-cut, step 2: the environment as a kernel module, its proposals in the review lane; the channel and router as MCP servers on it (S-219 to S-221) #32 uses S-219 to S-221 and Preview release v0.1.0-preview.1: pinned images, fresh-install fixes, README (S-222) #33 uses S-222, so this takes the next free number.
  • Short pointers in docs/plan.md and docs/parts.md.
  • scripts/trials/manager/watch.py: the supervisor's watch half, using only the standard library and no database. It reads claude agents --json --all, reads claude logs for failed or stopped sessions to find usage-limit stops, and prints the signals it would publish.

Checked

  • The Claude Code features the design relies on were read in the docs at code.claude.com on 2026-11-27: agent view, cross-session messaging, channels, scheduled tasks, Projects, headless, and the usage-limit error. CLI flags were checked against claude --help (2.1.332).
  • watch.py --once ran on this machine and printed one pm.worker.finished for the one background session. It also showed that background subagents don't appear in claude agents --json. That is why today's two usage-limit stops weren't visible, and why the design requires workers to be background sessions.
  • scripts/check.sh and scripts/test.sh were not run: they need the stack and its containers, and this session doesn't start any. The change is documentation plus one trial script, checked with py_compile.

For the owner

The open questions are in section 10:

  1. Privacy of the manager's stream on Haiku.
  2. Whether it takes over the Assistant window.
  3. Which projects count as own, and whether Kaggle runs free within its quota.
  4. Workers' defaults.
  5. Cloud work.
  6. Automatic resume after a usage limit.
  7. Where the mirror lives.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh

OpenReplicant and others added 9 commits November 27, 2026 09:13
… that hands work to workers and never does it itself

docs/manager-agent.md: the portfolio in the environment module with a files-only mirror, the lean manager on Haiku
with no built-in tools, workers behind gated actuators with one report contract, a supervisor that watches runners
and resumes usage-limit stops, decisions through #32's review lane and an inbox, a judge for "done", the desktop
view, failure modes and guards, trial PM-1 with its falsifier, the build order and the owner's questions. Builds on
#32's design, not its code. scripts/trials/manager/watch.py is the supervisor's watch half with no database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
… to S-222, then S-223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…nnet 5.5 as manager, local fast on routing only), with 43 replayable scenarios, per-arm metrics, a falsifier for "Haiku is reliable enough", and what public benchmarks can check (S-223)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…eplay, tests, and Haiku 5.5's first run (43 scenarios, one run)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…), export of the harness for Kaggle, tests with a mock server

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…xed split, GEPA on train and dev, a held-out verdict (refused)

The cell (catalog/component-manager-prompt.yaml): change is manager.md alone, routing accuracy primary, did-the-work-itself = 0 and
delegation recall as constraints, tokens and latency observed. PM-1a's scorer is frozen by hash. The 43 scenarios are split 20/10/13
with a fixed seed; the held-out 13 sit outside the repository. GEPA 0.1.4 (Haiku task, Sonnet reflection, subscription only):
100 Haiku runs, 8 reflections. The best candidate scored 10/10 on dev, 69.2% against the baseline's 71.8% on held-out (3 paired runs):
refused, manager.md unchanged. The feedback loop is designed in docs/manager-agent.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…aphrases, 24 incidents, 107 variations) with source, label confidence and reason; review table; split_v2.py for after the owner confirms; tests

Not active: labels are the owner's to confirm, and the frozen v1 files are untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…−11.6 against Haiku, [−27.9, +4.7]) at 15× the latency, LFM3 20.9%; neither replaces Haiku

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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