Files
kandev/docs/plans/session-concurrency-ceiling/plan.md
T
2026-09-17 15:59:28 +01:00

1.9 KiB

status, created, requirements, system_design
status created requirements system_design
done 2026-09-15
REQ-AGENTS-SESSION-CEILING-001
../../specs/agents/system-design/session-concurrency-ceiling.md

Session Concurrency Ceiling Delivery Plan

Overview

Add a shared instance-wide admission ceiling for agent sessions. Preserve the existing orchestrator launch seams, durable task metadata, and executor callbacks. Close the recovery, replay, stale-callback, and queue ownership gaps found during review.

Delivery flow

launch seam -> admission controller -> reservation or deferred_launch CAS
  -> executor callback -> confirm/release -> sweep replay -> task update

The controller owns live admission state. The task repository owns the durable retry record. The executor owns process identity. These ownership boundaries remain separate during repair.

Verification strategy

  • Run focused orchestrator tests for cold resume, callback identity, Office replay, dynamic relaunch outcomes, queue retry, and deferred-record conflicts.
  • Run focused task-service tests for nested ceiling prompt edits.
  • Run go test -race for the orchestrator package because reservations and callback release are concurrent.
  • Run the documentation coverage evaluator through the PR workflow after push.

Work orders

Risks

Follow-up: queued session ownership adds passive-origin enforcement and task queue visibility. Existing manual override semantics and the completed work order remain unchanged.

  • A repository read failure before a process callback is treated as not owned, so a reservation can wait for the sweep instead of being released by an ambiguous callback.
  • The startup ceiling is environment-only. Operators must restart the backend after changing it.