Skip to content

Enforce Hosted concurrent agent-run entitlement across execution entrypoints #2990

Closed

Description

@integry

Follow-up to audited #2989/#2987 in the authorized Hosted Fleet rollout. User requires concurrent agent-run limits Solo2/Team6/Scale12. #2989 aligns main worker/workflow settings but documents that API planner/chat, indexing/relevance analysis and usage-tip/background calls execute agents outside the main queue. Even supported single-main-worker topology can exceed N physical agent runs. Keep #2989 focused; implement this separate admission boundary on a branch that integrates its reviewed resolution when available (do not silently duplicate a conflicting resolver).

Outcome: instance-scoped shared admission for physical agent executions across worker/API/indexing/background entrypoints, including fallback/retries and multiple worker processes, with Hosted entitlement authoritative. Locate existing authoritative Hosted-mode/configuration boundary; preserve self-hosted behavior unless explicitly configured, and prevent UI settings from expanding Hosted entitlement. Do not count HTTP/UI waiting or non-agent artifact builds as running agents. Reuse existing Redis/infrastructure primitives where appropriate. Avoid nested-call double acquisition, cancellation deadlocks, silent skipped executions and premature lease reuse while containers still run. Handle renewal/loss, crash recovery, ownership fencing and release only after execution exit; fail closed when admission coordination is unavailable. Preserve repository-specific lower caps and existing cancellation/security boundaries.

Acceptance: Redis-backed contention tests saturate2/6/12 across actual wrapper entrypoints for main tasks/planner/chat/indexing/background and multiple processes; N+1 cannot start a physical agent execution, releasing one admits one waiter. Test cancellation while waiting/running, nested/fallback execution, holder crash, renewal loss and stale release, with no leaked or prematurely reused slots. Metrics distinguish waiting from running; document exact live Fleet acceptance steps and supported scope. No deployment/release/preview pin changes, no secrets/provider mutations, no recursive issue creation. Report dependency/conflicts with #2989 and any deliberately excluded non-agent work.

Activity

  1. propr-dev commented on Oct 11, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6-astra model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6-astra
    • Branch: 2990/gpt-6-astra-enforce-hosted-concurrent-20261011-1808-o9m
    • Base Branch: main
    • Worktree: issue-2990-20261011-1808-gpt-6-astra-o9m

    🔍 Track Task Execution

  2. added a commit that references this issue on Oct 11, 2026
  3. propr-dev commented on Oct 11, 2026

    @propr-dev
    Contributor

    Please address both outstanding independent review comments on PR #2992: #2992 (comment) and #2992 (comment). The automatic main merge completed at 7aaad5f. Independent admission tests finished with 8 passed and 4 failed (all wrapper cases) due to the Docker executable/context split. Combined head typecheck passed. Preserve the merged #2989 resolver, implement safe normal-lifecycle entitlement transitions and consistent isolated Docker execution, then run regression tests. No deployment, credential changes, or separate recursive task.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions