Skip to main content
Use less context when a task should receive only selected facts, or when old conversation distracts it from a focused job. Start with the default, messages, and reduce sharing at a boundary only after deciding what the receiver needs to know. On this page: The snippets below are additions or updates to an existing package. Merge them into its current variables:, agents:, and handoffs: blocks. There are two independent choices: A variable is never added to a prompt automatically. A task with reset can still read the values its prompt names. A task with no placeholders can still learn facts from the conversation when its history includes messages.

1. Start with messages

Omitting context or history means messages. You can write it explicitly:
agent.yaml
The task receives caller and agent speech, including the request that caused the task to start. Previous tool calls and replies are removed together. The receiver uses its own instructions. This is a good starting point for conversational tasks. The caller can say “Move my haircut to Friday afternoon” and the task can read that sentence. Do not reduce history just because the option exists.

2. Decide what must survive

Before switching to reset, list the facts needed to complete the job. For a booking change, that might be:
  • Which appointment to change.
  • The new date and time the caller selected.
  • Whether identity verification has already succeeded, if this task needs it.
A spoken request is not a saved value. An earlier task must save those facts through assign:, or they must already come from the call’s initial values or prefetch. Describing a variable does not fill it. Keep requested details separate from the latest successful booking. A failed move must not overwrite the saved appointment with an unbooked time.

3. Save the selected details

This example assumes the selection task has the tools needed to find the booking and check available times. Add the following fields and assignments to that task in your package:
agent.yaml
tasks/choose-booking.md
The three variable declarations provide the finish argument types. The selection task uses messages by default, so it can use “Friday afternoon” from the caller’s request. If several times are available, it asks the caller to choose before saving an exact Time. In the owner’s instructions, make the order clear:
instructions.md

4. Reset the next task and name its inputs

Update reschedule_booking under the same agent so it runs after selection:
agent.yaml
tasks/reschedule-booking.md
The task receives its own prompt with those three values. It receives no previous messages, tool results, summary, or sentence that triggered it. There is no automatic request passed by the owner. For no prior conversation and no saved values in the prompt, use reset and omit variable placeholders. The task can collect what it needs from the caller. Review its tools too: inject: and tool results are separate ways data can reach a task’s work.

5. Save the outcome and let the owner read it

Task history controls what goes into the task. On return, the owner gets its pre-task conversation back plus completed or unserved. It does not receive the task’s private messages or tool results, even with messages. For continuity after a move, save the successful result separately. Declare an Appointment shape with the fields your booking tool returns, as shown in Variables, and add:
agent.yaml
Add the assignment to reschedule_booking and change its final instruction:
tasks/reschedule-booking.md
The owner and any later agent that needs the booking should read it:
instructions.md
Verification reuses a different mechanism: mark the confirmed variable with confirm: on the verification task, then put that task as a task-group step with skip_when_confirmed: naming the variable. The group skips the step once it is confirmed, and runs it again once the caller corrects the value. See Reuse verification deliberately. Finishing with a non-empty unserved_request saves no assignments. It also does not undo a booking tool that already succeeded. Finish promptly after success so a new caller request is handled by the owner, not mistaken for unfinished booking work.

6. Apply the same choice to handoffs

A handoff applies its history choice to the receiving agent:
agent.yaml
Put any needed placeholders in customer_care’s instructions. For example, read the latest saved appointment so the caller does not have to identify it again. An unsaved complaint from the previous conversation will not cross a reset handoff; save the needed facts first or keep messages for that handoff. There is no automatic return from a handoff. See Handoffs.

7. Check both the helpful and the empty case

Validate and compile before testing the conversation:
Try these cases and inspect the model input in your trace: The public salon-concierge example uses messages for all tasks and handoffs. It shows how explicit saved values support continuity alongside spoken context. The internal salon-concierge-v3 example shows selected reset boundaries.

Other history options

The context reference covers every field and target restriction. A summary or a short history is not a substitute for reset when the receiver should inherit no conversation.

Where to go next

Designing declared state

Which facts to save, who saves them, and who reads them next.

Making a task actually run

What to give a task so the model enters it, and what to take off its owner.

Tasks

Declaring a task, saving its result, and saying what success looks like.

Task groups

Tasks in a fixed order, and skipping a step whose work is already done.