Skip to content

docs: correct the ephemeral labels on four persisted session events - #2172

Queued
examon wants to merge 1 commit into
mainfrom
sdk-bugfix-227
Queued

docs: correct the ephemeral labels on four persisted session events#2172
examon wants to merge 1 commit into
mainfrom
sdk-bugfix-227

Conversation

@examon

@examon examon commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

docs/features/streaming-events.md marks four events as "Ephemeral." although all four are persisted to the session event log and are still present in a resumed session's history. This removes the incorrect classification.

The affected events are permission.requested, permission.completed, external_tool.requested and external_tool.completed.

Fixes #2171

Why these four are persisted

The file defines the term itself, which is what makes the label falsifiable:

| Ephemeral event | Transient; streamed in real time but not persisted to the session log. Not replayed on session resume. |

and gives the operational rule in the event-envelope table:

| ephemeral | boolean? | true for transient events; absent or false for persisted events |

None of the four carried the field in the sessions I ran, so by the file's own rule they are persisted. The generated event types agree. A genuinely ephemeral event declares a required literal (IdleEvent: ephemeral: true); three of these four declare the ordinary ephemeral?: boolean used by every other persisted event such as assistant.turn_start, and ExternalToolCompletedEvent declares ephemeral?: true — an optional literal, the only one in the generated types, which constrains the value only when the field is present. Current sessions do not emit it.

The labels were correct when the guide was added in #717. #1177 regenerated the types and moved all four off the required-literal shape in one commit; the prose was not updated with them.

What changed

Ten lines in one file, all deletions of the classification. Nothing else in the file was touched.

  • The four event sections drop the leading Ephemeral. . The file's existing convention is that persisted events carry no marker, so this matches the 24 sections that are already unmarked, and no new wording is introduced.
  • The two permission.* entries of the "agentic turn flow" diagram drop the trailing (ephemeral), matching the diagram's unannotated persisted entries.
  • The four corresponding rows of the "All event types at a glance" table have the Ephemeral column cleared, matching the empty cell every persisted row already uses.

Before:

### `permission.requested`

Ephemeral. The agent needs permission to perform an action (run a command, write a file, etc.).

After:

### `permission.requested`

The agent needs permission to perform an action (run a command, write a file, etc.).

The glossary and the envelope table are untouched: they are the definitions these labels contradicted. The other 20 events marked "Ephemeral." in the file are correct and are unchanged.

Verification

A differential over the whole file compares three surfaces — every event section, every summary-table row, and every entry of the turn-flow diagram — against the ephemeral shape in the schema shipped with the pinned @github/copilot dependency, classifying an event as ephemeral only when the property is const: true and listed in the envelope's required.

Sections Table Diagram
Before 4 mismatches 4 mismatches 2 mismatches
After 0 0 0

The mismatches before the change are exactly the four events above; no other event is affected in either direction. The check is deterministic across repeated runs.

Behaviour was confirmed separately with real sessions run against a local build of this branch: all four events appear in the session's event log and in the resumed session's history, while the session.idle and assistant.message_delta controls are correctly absent from both.

Documentation validation passes (scripts/docs-validation: TypeScript, Python, Go and C# all green locally; the Java leg needs Maven, which was unavailable in my environment). The change touches no extracted code block — the only fenced block it edits is the untagged diagram, which the extractor ignores — and the file's line count is unchanged, so no extracted block's reported line number moves.

Scope

Documentation only. No code, no generated file, no schema, no sample and no public API is affected.

One thing this does not do: nothing detects this kind of drift. The extractor only validates fenced code blocks, so prose claims about the event contract are unchecked and can go stale again the next time the classification changes. Comparing this file's Ephemeral column against the schema that already ships with the pinned dependency would be a small check, and I am happy to follow up with one if that is wanted.

docs/features/streaming-events.md marks permission.requested,
permission.completed, external_tool.requested and external_tool.completed as
"Ephemeral.", which that file defines as not persisted to the session event log
and not replayed on session resume. All four are persisted: sessions record them
in the event log, and they are still present in a resumed session's history.

The labels were accurate when the guide was written in #717. #1177 regenerated
the event types so that none of these four still declares a required
`ephemeral: true`, but the prose was not updated with them.

Remove the classification from the four event sections, the two permission
entries in the turn-flow diagram, and the four summary-table rows, matching the
convention the file already uses for persisted events, which carry no marker.
@examon
examon requested a review from a team as a code owner July 30, 2026 18:57
Copilot AI review requested due to automatic review settings July 30, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Corrects documentation to classify four persisted session events accurately.

Changes:

  • Removes incorrect “Ephemeral” labels from four event descriptions and summary rows.
  • Updates the agentic turn flow diagram for permission events.
Show a summary per file
File Description
docs/features/streaming-events.md Corrects persistence classifications across reference sections, diagram, and summary table.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@stephentoub
stephentoub added this pull request to the merge queue Jul 31, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 31, 2026
@examon
examon added this pull request to the merge queue Jul 31, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: streaming-events.md marks four persisted events as "Ephemeral"

3 participants