-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
component-cliCLI commands and interfaceCLI commands and interfacecomponent-e2bE2B sandbox integrationE2B sandbox integrationenhancementNew feature or requestNew feature or requestphase-1-e2b-enhancedPhase 1: Enhanced E2B features (v2.0)Phase 1: Enhanced E2B features (v2.0)priority-mediumMedium priority - next milestoneMedium priority - next milestone
Description
Problem
Users have no way to limit E2B spending, leading to potential surprise costs for long-running or many parallel tasks.
Proposed Solution
Session Budget Limits
# Limit single session
parallel-cc sandbox-run --repo . --prompt "Task" --budget 0.50
# Limit is in USD
# Session terminates if limit reachedGlobal Budget Limits
# Set global monthly limit
parallel-cc config set budget.monthly-limit 10.00
# Set per-session default
parallel-cc config set budget.per-session 1.00Notifications
- Warning at 50% of budget
- Warning at 80% of budget
- Hard stop at 100%
Cost Tracking
- Track actual costs per session
- Daily/weekly/monthly reports
- Cost breakdown by task type
Database Schema
ALTER TABLE sessions ADD COLUMN budget_limit REAL;
ALTER TABLE sessions ADD COLUMN cost_estimate REAL;
ALTER TABLE sessions ADD COLUMN actual_cost REAL;
CREATE TABLE budget_tracking (
id TEXT PRIMARY KEY,
period TEXT, -- 'daily', 'weekly', 'monthly'
period_start TEXT,
budget_limit REAL,
spent REAL,
created_at TEXT
);Files to Modify
src/cli.ts- Add budget flagssrc/e2b/sandbox-manager.ts- Monitor and enforce limitssrc/db.ts- Budget tracking tables
Acceptance Criteria
- Per-session budget limits work
- Global budget limits configurable
- Cost tracking persisted to database
- Warnings issued at configurable thresholds
-
parallel-cc budget-statusshows current spending
Dependencies
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component-cliCLI commands and interfaceCLI commands and interfacecomponent-e2bE2B sandbox integrationE2B sandbox integrationenhancementNew feature or requestNew feature or requestphase-1-e2b-enhancedPhase 1: Enhanced E2B features (v2.0)Phase 1: Enhanced E2B features (v2.0)priority-mediumMedium priority - next milestoneMedium priority - next milestone