From eccadf772b566f5bf8294df6b1a2527117efcb13 Mon Sep 17 00:00:00 2001 From: hbrooks Date: Sun, 28 Jun 2026 14:44:43 -0400 Subject: [PATCH] Send config_override_yaml instead of budget_usd on run start The backend replaced the per-run budget_usd field with config_override_yaml (a partial config merged onto the chosen config and re-validated). Keep the ergonomic '-b, --budget ' flag, but translate it to a config override that sets limits.run, so the CLI works with the new API and the budget UX is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/commands/run.tsx | 12 ++++++++++-- src/lib/types.ts | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/commands/run.tsx b/src/commands/run.tsx index 457a5ab..7657037 100644 --- a/src/commands/run.tsx +++ b/src/commands/run.tsx @@ -43,7 +43,11 @@ export function registerRun(program: Command): void { '-t, --template ', 'start from a maintained run template (e.g. welcome-to-ellipsis)', ) - .option('-b, --budget ', 'per-run budget override in USD', parseFloat) + .option( + '-b, --budget ', + "per-run budget override in USD (sets the config's limits.run for this run)", + parseFloat, + ) .option( '-m, --metadata ', 'attach metadata (repeatable)', @@ -81,7 +85,11 @@ export function registerRun(program: Command): void { if (opts.config) req.config_id = opts.config if (opts.configFile) req.config = readJsonFile(opts.configFile) if (opts.template) req.template_id = opts.template - if (opts.budget !== undefined) req.budget_usd = opts.budget + // A budget is expressed as a config override of limits.run (the server + // merges it onto the chosen config and re-validates). + if (opts.budget !== undefined) { + req.config_override_yaml = `limits:\n run: ${opts.budget}` + } const api = new ApiClient() const run = await api.startAgentRun(req) diff --git a/src/lib/types.ts b/src/lib/types.ts index f24a353..aa214bc 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -132,7 +132,10 @@ export interface StartAgentRunRequest { template_id?: string source?: AgentRunSource metadata?: Record - budget_usd?: number + // A partial agent config (YAML) merged onto the chosen config and re-validated + // server-side, e.g. "limits:\n run: 5.0" to set just this run's budget. Only + // meaningful with config_id/template_id. + config_override_yaml?: string } export interface ListAgentRunsResponse {