Repository navigation
Closed
Labels
Description
Context
The Agents v1 cost gate (#2810) decides whether an unattended run (trigger schedule, api, mcp, cli) proceeds, defers or skips based on subscription usage from Agent Tank. Two admission controls from the superseded scheduled-tasks spec (#2744) are not covered by the epic and belong in the same gate:
- Unattended concurrency cap — instance setting
unattended_max_concurrent(default 1): the number of agent runs inqueued/running/actingwhose trigger is notmanualmust stay below the cap; otherwise the run isdeferred(short step, e.g. 5 minutes, counted againstmaxDeferrals) with a reason such as "2 unattended runs are already active (cap 1)". - Local-time window — optional instance setting
unattended_window, e.g.02:00-07:00@Europe/Riga: outside the window an unattended run isdeferreduntil the window opens (with the deferral count not incremented for pure window waits); a malformed window blocks unattended work and shows a warning in Settings rather than allowing everything.
manual (UI "Run now") stays exempt from both, as it is from the usage gate.
Requirements
- Extend
createAgentRunCostGateinpackages/core/src/services/agents/agentRunCostGate.ts(from Agents v1 (11/17): Agent Tank usage / cost gate for scheduled and unattended runs #2810) with the two checks, evaluated after the usage checks, with injectablenow,countActiveUnattendedRunsand settings loaders for tests. - Settings in
packages/core/src/config/configManager.ts, the MCP settings catalog,propr setting, and the Settings UI next to the usage-pause threshold; document indocs/docs/operations/settings-locations.mdand the Agents feature guide (Agents v1 (17/17): Documentation — feature guide, API/MCP/CLI reference, operations and limitations #2816). GET /api/agent-definitions/:id/capacity(from Agents v1 (11/17): Agent Tank usage / cost gate for scheduled and unattended runs #2810) includes the current cap usage and window state so the UI warning can show "outside the unattended window until 02:00 Europe/Riga".- Tests in
test/agentRunCostGate.test.ts: cap reached → defer with reason; window closed → defer until open; malformed window → skip with a reason; DST boundary;manualunaffected.
Depends on the Agents v1 epic landing (#2810, #2811).
Follow-up from #2744, which was closed as superseded by the Agents v1 epic.
Activity
propr-dev commentedon Oct 7, 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-52848/claude-opus-5-5-agents-unattended-concurr-20261007-2201-efumainissue-2848-20261007-2201-claude-opus-5-5-efu🔍 Track Task Execution
propr-dev commentedon Oct 7, 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-52848/claude-opus-5-5-agents-unattended-concurr-20261007-2226-r44mainissue-2848-20261007-2226-claude-opus-5-5-r44🔍 Track Task Execution