-
Notifications
You must be signed in to change notification settings - Fork 425
Proposal: flexible budget and limit control across session continuation #3849
Copy link
Copy link
Open
Labels
area/agentFor work that has to do with the general agent loop/agentic features of the appFor work that has to do with the general agent loop/agentic features of the apparea/apiFor features/issues/fixes related to the usage of the cagent APIFor features/issues/fixes related to the usage of the cagent APIarea/cliCLI commands, flags, output formattingCLI commands, flags, output formattingarea/configFor configuration parsing, YAML, environment variablesFor configuration parsing, YAML, environment variablesarea/runtimeRuntime engine, agent loop execution, tool dispatch, loop detectionRuntime engine, agent loop execution, tool dispatch, loop detectionarea/securityAuthentication, authorization, secrets, vulnerabilitiesAuthentication, authorization, secrets, vulnerabilitiesarea/sessionsFor features/issues/fixes related to session lifecycle (resume, persistence, export)For features/issues/fixes related to session lifecycle (resume, persistence, export)area/tuiFor features/issues/fixes related to the TUIFor features/issues/fixes related to the TUIstatus/needs-designRequires architectural discussion or design reviewRequires architectural discussion or design review
Description
Metadata
Metadata
Assignees
Labels
area/agentFor work that has to do with the general agent loop/agentic features of the appFor work that has to do with the general agent loop/agentic features of the apparea/apiFor features/issues/fixes related to the usage of the cagent APIFor features/issues/fixes related to the usage of the cagent APIarea/cliCLI commands, flags, output formattingCLI commands, flags, output formattingarea/configFor configuration parsing, YAML, environment variablesFor configuration parsing, YAML, environment variablesarea/runtimeRuntime engine, agent loop execution, tool dispatch, loop detectionRuntime engine, agent loop execution, tool dispatch, loop detectionarea/securityAuthentication, authorization, secrets, vulnerabilitiesAuthentication, authorization, secrets, vulnerabilitiesarea/sessionsFor features/issues/fixes related to session lifecycle (resume, persistence, export)For features/issues/fixes related to session lifecycle (resume, persistence, export)area/tuiFor features/issues/fixes related to the TUIFor features/issues/fixes related to the TUIstatus/needs-designRequires architectural discussion or design reviewRequires architectural discussion or design review
Status
Proposal only — this issue requests design and implementation planning; it does not authorize an implementation yet.
Why
Today, a run can terminate when its iteration or runtime budget is exhausted, but the user experience for restoring and continuing is poor: the continuation path can be unclear, and restarting or forking can make accounting look reset or incomplete. That creates trust concerns about whether a resumed session is still honoring the original limits, especially for unattended, shared, or security-sensitive workloads. A session should be able to continue deliberately without silently creating a fresh allowance or bypassing a prior stop reason.
This builds on the budget discussion in #3701, but focuses on durable accounting and truthful continuation semantics rather than only declaring limits.
What
Design a persisted, root-owned budget ledger for each session tree:
How / proposed phased rollout
flexible-budget-limit-controlas the authoritative source for full PR sequencing and design decisions.Acceptance criteria
The detailed implementation plan, including full PR sequencing, migration, safety, backwards compatibility, validation, and rollout gate, is shared under slug
flexible-budget-limit-control.