Skip to content

session: interactive chat bypasses daily spending limit #1546

Description

@santoshkumarradha

Summary

Interactive chat turns and /task delegations 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 do and 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. Set daily budget rail to $1.00 via workspace config or /budget 1.
  2. Run interactive chat turns until spend exceeds $1.00.
  3. Submit a subsequent turn or /task. The session continues executing and incurring costs.

Root Cause / Location

In internal/session/taskcrew.go:211, crewSpendGuard is called with enforceDaily: false:

crewSpendGuard(..., false)

Rail checks in internal/session/rail.go:58-82 only validate per-session budgets when enforceDaily is disabled.

—
Drafted with CodeAF · reviewed and owned by the author

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:providerRouting, lanes, refusals, hedging, what a call costsarea:sessionThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should notsev:criticalData loss, money spent wrongly, a false done, or the merge queue blocked

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions