CutCtx guides

How to Set a Context Budget for a Multi-Step Agent Task

A worksheet for budgeting task instructions, evidence, tool results, and response space without assuming a model's context limit or promising savings.

A context budget is a planning tool for deciding what information a multi-step task needs and how much room to reserve for the response. It helps teams notice when repeated instructions, long tool outputs, or stale material are crowding out evidence that matters to the next decision.

There is no universal token allocation that fits every model or task. Check the current model documentation and measure with the actual tokenizer and workflow before relying on a limit. The worksheet below is hypothetical and makes no claim about CutCtx performance.

List what each step needs to know

Write down the task goal, constraints, source evidence, current state, and output format. For a multi-step process, distinguish information needed by every step from information needed only at one decision point. This makes it easier to avoid carrying full intermediate output forward when a concise source-linked summary is enough.

Before shortening anything, preserve the facts and references needed to verify the next action. If a detail cannot be recovered later and could change the result, do not remove it solely to save space.

  • Instructions and invariants that must remain visible.
  • Evidence needed for the next decision, with source identifiers.
  • Tool outputs that can be filtered, summarized, or retrieved again.
  • Response and reasoning room needed to complete the task.
  • A contingency reserve for retries or unexpected output.

Use a worksheet, then measure the actual request

Estimate categories separately before combining them. Then check the actual prompt or request using the provider's current counting method. Token counts depend on the model and representation; character counts and rough word counts are not reliable substitutes for a measured request size.

The token allocations in this example are planning assumptions. They are not recommendations, a supported model limit, or an estimate of achievable compression. Replace them with measurements for the task and model you actually use.

Category Planned tokens (hypothetical) What belongs here
Instructions and fixed rules1,200Task, boundaries, required output
Selected evidence3,000Relevant source excerpts and identifiers
Current state and tool results2,000Only current findings needed for the next action
Response room1,500Expected answer or structured output
Contingency reserve800Retry or unexpected tool output
Planning total8,500Sum of these invented allocations

Choose what to retain, summarize, or retrieve

Retain exact identifiers, constraints, decisions, and evidence that must be acted on. Summarize repetitive or intermediate material only when the summary preserves the distinctions relevant to the next step. Retrieve a source again when the exact text is important and retrieval is available and permitted.

A summary is a lossy transformation unless proven otherwise. Keep links or stable source references and spot-check summaries against the underlying material, especially for negation, dates, quantities, exceptions, and ownership.

Information Default treatment Check before reducing
Task constraints and approval boundariesRetain explicitlyCould a later step mistake what is allowed?
Source facts used in a decisionRetain with source pointerCan a reviewer retrieve and verify the source?
Repeated boilerplateConsider one canonical copyDoes any step depend on its exact wording?
Large tool outputFilter or summarize with provenanceWere errors, exceptions, or negative results dropped?
Unneeded intermediate outputDiscard when safeCould it be needed to reproduce or debug the result?

Review the budget after a complete task

Record the measured input size, number of steps, tool-output sizes, retries, and whether the task met its quality criteria. If a workflow repeatedly exceeds its budget, identify whether the cause is duplicated instructions, broad retrieval, verbose tools, or an overlarge task. Change one factor at a time where practical.

Treat cost and quality as separate measures. A smaller prompt is not an improvement if it omits required evidence, increases rework, or makes a consequential answer harder to review.

References