Repository navigation
Description
Problem
Admission state is invisible. The waiting / reserved / running / recovering counts exist only in a log line, there is no endpoint, MCP tool or CLI command for them, and nothing distinguishes a job waiting on the global limit from one waiting on its agent's ceiling. The routes that are called "capacity" today report subscription usage, which is a different thing. Goals and the dependency-aware scheduler planned in #3385 need real capacity data to build on.
Goal
One capacity interface that reports what admission actually enforces, globally and per agent, plus operator documentation for changing ceilings safely.
Acceptance criteria
- A read-only REST endpoint and an MCP tool return: whether admission is enabled, the global limit and its source, and globally and per agent alias the ceiling (if any) and the counts of running, reserved, recovering and waiting executions, with waiting split into waiting on the global limit, waiting on the agent's ceiling and deferred jobs. Nested executions charged under a parent are shown separately from holders.
- The same response includes the other limits a scheduler has to respect, each labelled with what it is: queue worker concurrency in use and total, and repository workflow slots in use per repository that has a limit. Subscription usage stays where it is and is not folded in; the docs explain the difference.
- No secrets, tokens, container ids or environment values are exposed. Task ids are included only for callers allowed to see those tasks.
- A CLI command prints the same data in a readable table and as JSON.
- The admission log lines for waiting and admitted include the alias and the reason for a wait.
- The task timeline row for an agent-capacity wait says which agent and ceiling it is waiting on.
- Hosted fleet queue status counts jobs deferred for capacity, which are in the delayed state and invisible to it today.
- Operator documentation covers: what each limit means and how they combine, how to set
PROPR_AGENT_RUN_ALIAS_LIMITS, that raising and lowering a ceiling needs no drain and what lowering does to running work, how this differs from changing the global limit (generation bump and drain), how to roll back, and what to expect during a rolling restart with mixed versions. - The new route, tool and setting satisfy the repository's contract checks: route registry and authorization, OpenAPI document and generated client types, MCP docs and coverage list, settings catalog and generated settings page.
- With admission off, the endpoint says so and returns the remaining limits; nothing errors.
- Tests cover the counts under real contention (real Redis), the split of waiting reasons, the redaction rules, the disabled case and the CLI output.
Out of scope
- A settings UI for ceilings; an admin page for capacity.
- Change events or subscriptions for capacity (tracked with the integration signals for [RFC] Autonomous Engineering Coordinator — Architecture and Contribution Guidance #3385).
Implementation
Key files: packages/core/src/agents/agentRunAdmission.ts (agentAdmissionMetrics, agentAdmissionKeys; waiting-zset members are bare tokens today, so the reason and alias of a wait have to be recorded), packages/api/routeRegistry.ts, packages/api/routes/queueRoutes.ts (/api/queue/stats; fleet queue status counts waiting plus active only), packages/api/routes/statusRoutes.ts, packages/api/routes/dashboardRoutes.ts ("all agents are busy" from the worker heartbeat in src/worker.ts), packages/core/src/workflow/workflowConcurrency.ts (repository slots), src/workerConcurrency.ts, packages/api/mcp/toolsActivity.ts (get_current_activity), packages/api/mcp/toolsManagement.ts (get_execution_settings), packages/api/mcp/toolsConfiguration.ts (get_provider_status / get_provider_usage are subscription usage), packages/api/routes/automationDefinitionRoutes.ts (existing /capacity routes mean subscription usage: pick a name that cannot be confused, and say so in the docs), packages/cli/src/commands/ and packages/cli/src/api/, packages/api/mcp/settingsCatalog.ts.
Contract checks to keep green: packages/api/test/openapiRouteCoverage.test.ts, packages/api/test/routeAuthorization.test.ts, packages/api/test/settingsCatalog.test.ts, packages/api/test/mcpObservableSurface.test.ts (every backticked token in docs/mcp.md must be a tool name or on the non-tool allowlist), and the generators in package.json (docs:settings, gen:openapi, gen:openapi:check, check:client-contract). Docs: docs/docs/architecture/agent-run-admission.md, a new or extended operations page, docs/docs/operations/configuration-reference.md, docs/mcp.md, docs/mcp-coverage.md. Verify with the standard commands.
Activity
propr-dev commentedon Nov 13, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53481/claude-opus-5-5-report-admission-capacity-20261113-0215-dfv3478-epic-per-agent-9uvissue-3481-20261113-0215-claude-opus-5-5-dfv🔍 Track Task Execution
I've added one capacity report for issue #3481. It's served three way…