Skip to content

Agent slot gate: routes that wake an idle thread are still ungated #711

Closed

Description

@scuttletoby

Follow-up to #706 / #710. #710 puts create_threads, t3_thread_launch and scheduled runs behind the same agent slot gate as delegate_task. These routes still start an agent run in an existing idle thread without taking a slot:

  • t3_thread_send to an idle thread
  • t3_thread_transfer when it forks the thread
  • wait deliveries (wait_for etc.) that wake an idle thread

A person typing in the composer is left ungated on purpose (a person decides).

Decide per route: gate it (refuse or hold with the same plain reason), or document why it stays open. Mind that a woken parent that is refused must not lose the wake-up (it should start when a slot frees, like refused scheduled runs in #710).

🤖 Generated with Claude Code

Activity

  1. scuttletoby commented on Nov 21, 2026

    @scuttletoby
    OwnerAuthor

    One more ungated start, found in the last review round of #710:

    • What happens: a scheduled task is bound to a thread whose run is active, so it only queues its prompt there and takes no slot. If that run ends in the few milliseconds between the "is it running" check and the send (mode: "queue"), the send starts one new run without a slot: on an idle thread, a queued send starts at once.
    • Effect: nothing is lost and nothing runs twice, but there is one start over the limit.
    • Fix: it is the same case as "t3_thread_send to an idle thread" above, and closes with it, when the send itself asks the gate for an idle thread.

    🤖 Generated with Claude Code

  2. added 18 commits that reference this issue on Nov 21, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions