Skip to content

Enforce a pre-spawn model budget for planning invocations #163

Closed

Description

@mchwang

Split from #6.

Problem

docs/plan-format.md requires "pre-spawn byte/model-token budgets". Planning has byte limits only: MAX_PROMPT_BYTES in core/planning-author.ts and the issue-text limits in github/issues.ts. createClaudeCommand in agents/policy.ts passes no turn or budget flag, so one planning invocation is bounded by wall-clock time and output bytes only, not by model tokens or turns.

Acceptance

  • Choose the budget (for example --max-turns, or a token estimate checked before spawn) and record why in the docs.
  • Enforce it before the agent process starts. Refuse a request over budget with a clear error.
  • Add a test at the exact budget and one unit over it, including the argv that createClaudeCommand builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions