Skip to content

G8 Agent slot counting: one source (server.agentSlots) #849

Open

Description

@scuttletoby

Part of #834.

Problem: three things count "how many agents are running": server.agentSlots, an agent-slots hook, and a hand-kept line in the orchestrator's private state file. They can disagree, and the orchestrator has to reconcile them by hand from the live thread list.

Done when: server.agentSlots is the only count; the hook and every tool read it; the state file no longer keeps a slot line; a test proves that a crashed or finished child frees its slot.

🤖 Generated with Claude Code

Activity

  1. added
    area:agents
    size:big
    type:feature
    on Nov 29, 2026
  2. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on the first part: the agent-slots hook reads the server's slot gate count (server.agentSlots) instead of counting processes. The server writes that count to a file next to server-runtime.json, and the hook reads that file. One fork PR.

    🤖 Generated with Claude Code

  3. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on the next part ("every tool reads it", left by #1292): fork-kit/heavy's agent-slots hook still counts pgrep processes. It gets the same t3_server_state key and reads T3's slot gate count from agent-slots.json, and the reader moves to one shared file in fork-kit/common that both kits' hooks use, so the two hooks cannot disagree. One fork PR.

    🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentssize:bigtype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions