ClaudePrompt chainingLevel 3: Workflows

How Do You Pass Results From One Claude Prompt to the Next?

Agree on the fields that the next step needs, have Claude output exactly those, and pass only that to the next prompt. In chat, use a tagged block. On the API, use structured outputs, which constrain the response to your JSON schema. Don't pass along a long prose summary and hope nothing was lost.

Prompt to copy
Do [step 1 task] on the material below. End with exactly this block and nothing after it:

<handoff>
  <decision>one sentence</decision>
  <facts>each fact on its own line, with its source</facts>
  <open_questions>what's still unknown</open_questions>
  <do_not_change>anything the next step must keep exactly as written</do_not_change>
</handoff>

If you don't have something for a field, write "none" rather than leaving it out.

<material>
[paste it]
</material>
Prose summaryhope nothing was lost
  • A missing point stays hidden
  • Abandoned ideas come along
  • More tokens at each step
Agreed fieldsonly what the next step needs
  • An empty field shows the gap
  • The next step starts clean
  • Fewer tokens at each step
Rule of thumb, not an Anthropic chart: the next step gets the agreed fields, not the whole conversation.

Try it now

  1. 1Run step 1 with the prompt above in one chat.
  2. 2Read the <handoff> block, and correct anything wrong. This is your checkpoint.
  3. 3Open a new chat, paste only the block, and write: "Using only this handoff, do [step 2]. If something you need isn't here, ask me."
  4. 4You'll know it worked if step 2 either succeeds or asks for something specific. If it's guessing, add that missing field to the handoff.

Use it when

Use it whenever a step's output goes to another prompt or to code: extraction to analysis, research to drafting, or a planner to a worker. It matters most when the steps run in separate chats or sessions.

Skip it when

Skip it when you read the output yourself and decide what happens next, or when the next step really needs the original wording, as with an edit or a translation. In that case, pass the source itself. A schema also won't save a step that needs judgment you never defined.

Why it works

Anthropic's docs say structured outputs use constrained decoding, so responses match your schema with no JSON parse errors or retries for violations. Its prompting guide also recommends structured formats like JSON for state data and XML tags to separate content. A named field makes a gap visible, because an empty evidence field is easy to catch, whereas a missing point in a summary isn't. And a clean handoff means the next step starts without the earlier conversation, which saves tokens and removes abandoned ideas.

Example

You're preparing a sales call. Step 1 reads the prospect's annual report and ends with a handoff listing three priorities, each with a page reference, plus open questions. Step 2, in a new chat, gets only that block and writes the call plan. If it invents a priority, you'll see it isn't in the block, and it's easy to trace.

Going further

On the API, set output_config.format with a json_schema. Three cases can still break a chain, so check stop_reason first. A refusal returns a 200 and is billed, but may not match the schema. max_tokens can leave output incomplete. And enums can come back with changed capitalization, so compare them case-insensitively. Schemas reject minimum, maxLength and recursive structures with a 400 error, so validate those in your code, and the first request with a new schema is slower while its grammar compiles. Compiled grammars are cached for 24 hours from last use. Don't add a reasoning field either, since on current models that can trigger a refusal.

Common mistakes

  • Passing "the summary above" through a long chat, where the next step can also see every rejected idea.
  • Handing over conclusions without their sources, so a later step can't check them.
  • Sending output to the next step without checking stop_reason, so a truncated response looks like a short one.
  • Adding fields no later step uses, which pads every step and gives Claude something to fill with guesses.

Sources

Checked 6 November 2026. Products change often, so confirm details with the vendor.

Related

Beyond the course