-
Notifications
You must be signed in to change notification settings - Fork 39
session: interactive chat bypasses daily spending limit #1546
Copy link
Copy link
Open
Labels
area:providerRouting, lanes, refusals, hedging, what a call costsRouting, lanes, refusals, hedging, what a call costsarea:sessionThe engine — turns, tasks, the toolbelt, checkpointsThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should notSomething the code does that it should notsev:criticalData loss, money spent wrongly, a false done, or the merge queue blockedData loss, money spent wrongly, a false done, or the merge queue blocked
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
area:providerRouting, lanes, refusals, hedging, what a call costsRouting, lanes, refusals, hedging, what a call costsarea:sessionThe engine — turns, tasks, the toolbelt, checkpointsThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should notSomething the code does that it should notsev:criticalData loss, money spent wrongly, a false done, or the merge queue blockedData loss, money spent wrongly, a false done, or the merge queue blocked
Summary
Interactive chat turns and
/taskdelegations bypass the project-wide daily spending rail and only check the per-conversation limit.Observed Behavior
When a session hits or exceeds the configured daily budget, interactive chat turns and tasks spawned from chat continue executing and consuming model spend without tripping the daily spending limit. Only headless
codeaf doand standing firings enforce the daily rail.Expected Behavior
Every execution path (interactive chat, task crew, standing firings, headless runs) must enforce the daily spend ceiling configured in the workspace/project rails.
Reproduction Steps
$1.00via workspace config or/budget 1.$1.00./task. The session continues executing and incurring costs.Root Cause / Location
In
internal/session/taskcrew.go:211,crewSpendGuardis called withenforceDaily: false:Rail checks in
internal/session/rail.go:58-82only validate per-session budgets whenenforceDailyis disabled.—
Drafted with CodeAF · reviewed and owned by the author