events-and-streaming changedmanaged-agents/events-and-streaming
Nearest release: v2.1.277, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+7added
Lines−10removed
From line
920
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits39to this page, all time
The whole hunk
from line 920, old and new numbered
/
from line 920
920920 -H "x-api-key: $ANTHROPIC_API_KEY" \
921921 -H "anthropic-version: 2023-06-01" \
922922 -H "anthropic-beta: managed-agents-2026-04-01" \
923 -H "content-type: application/json" \
924 | jq -r '.data[] | "[\(.type)] \(.processed_at)"'
923 -H "content-type: application/json"
925924 ```
926925
927926 ```bash CLI
928 ant beta:sessions:events list --session-id "$SESSION_ID" \
929 --format jsonl --transform '{type,processed_at}'
927 ant beta:sessions:events list --session-id "$SESSION_ID" --format jsonl
930928 ```
931929
932930 ```python Python
from line 989
991989 curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/events?beta=true&types[]=agent.tool_use&types[]=agent.tool_result" \
992990 -H "x-api-key: $ANTHROPIC_API_KEY" \
993991 -H "anthropic-version: 2023-06-01" \
994 -H "anthropic-beta: managed-agents-2026-04-01" \
995 | jq -r '.data[] | "[\(.type)] \(.processed_at)"'
992 -H "anthropic-beta: managed-agents-2026-04-01"
996993 ```
997994
998995 ```bash CLI
999996 ant beta:sessions:events list --session-id "$SESSION_ID" \
1000997 --type agent.tool_use --type agent.tool_result \
1001 --format jsonl --transform '{type,processed_at}'
998 --format jsonl
1002999 ```
10031000
10041001 ```python Python
from line 1582
15851582
15861583The preview events themselves don't change. `event_start` and `event_delta` have the same shape on a thread stream as on the session-level stream, and the [accumulate and reconcile](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#accumulate-and-reconcile) pattern applies as written. The one adjustment is bookkeeping: run one accumulator instance per stream connection.
15871584
1588<CodeGroup defaultLanguage="cURL">
1585<CodeGroup>
15891586 ```bash cURL
15901587 # List the session's threads and pick a child: child threads carry a non-null
15911588 # parent_thread_id, and the primary thread's parent_thread_id is null.
from line 2456
24592456
24602457To resume a session, send a `user.message` event to it as usual:
24612458
2462<CodeGroup defaultLanguage="CLI">
2459<CodeGroup>
24632460 ```bash cURL
24642461 # In production, pass the stored ID of the session you want to resume.
24652462 curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/events?beta=true" \
from line 2640
26432640
26442641Send a `system.message` event to give the agent privileged system-level context that applies to the accompanying turn and all subsequent turns. Unlike the `system` field on the agent definition (which sets the top-level system prompt), `system.message` content is appended to the session's system context as a `role: "system"` turn rather than replacing that prompt. Use it when the agent needs updated system-level guidance mid-session: a different persona, revised constraints, or context fetched at runtime that should shape the model's behavior going forward.
26452642
2646<CodeGroup defaultLanguage="CLI">
2643<CodeGroup>
26472644 ```bash cURL
26482645 curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/events?beta=true" \
26492646 -H "x-api-key: $ANTHROPIC_API_KEY" \
No line in this hunk matches that.