Context
Praxis core #988 and AI #756 establish one logical client-visible Responses SSE lifecycle across IRR inference rounds. Backend-originated events, response identity normalization, terminal-event handling, and loop continuation are therefore outside this issue.
Server-side execution filters such as openai_mcp_dispatch and openai_web_search also create or update tool activity locally in ResponsesState. Those changes do not necessarily originate in the model backend's SSE stream and still need Responses-compatible client-visible events.
Scope
Synthesize SSE only for tool activity generated locally by server-side execution filters:
- MCP call and result progress events.
- Web-search progress events that were not already emitted by the upstream model.
- Shared event injection and ordering needed by those filters.
File-search-specific progress events remain tracked by #313. MCP tool-listing failure events remain tracked by #320.
Ownership
Acceptance criteria
- Locally generated MCP activity is emitted exactly once using valid Responses event shapes.
- Locally generated web-search activity not already present in the upstream stream is emitted exactly once.
- Synthesized events use the logical response ID and valid output indices and sequence numbers.
- Synthesized events are emitted before events from the resumed model response.
- No duplicate response lifecycle events or duplicate output items are produced across rounds.
- The final
response.completed snapshot agrees with the items previously emitted to the client.
- Non-streaming behavior remains unchanged.
- End-to-end tests assert event type, ordering, identity, sequence numbering, and deduplication for model → tool → model flows.
Out of scope
Relationships
Context
Praxis core #988 and AI #756 establish one logical client-visible Responses SSE lifecycle across IRR inference rounds. Backend-originated events, response identity normalization, terminal-event handling, and loop continuation are therefore outside this issue.
Server-side execution filters such as
openai_mcp_dispatchandopenai_web_searchalso create or update tool activity locally inResponsesState. Those changes do not necessarily originate in the model backend's SSE stream and still need Responses-compatible client-visible events.Scope
Synthesize SSE only for tool activity generated locally by server-side execution filters:
File-search-specific progress events remain tracked by #313. MCP tool-listing failure events remain tracked by #320.
Ownership
openai_stream_events(Filter 6: stream_events #25).openai_agentic_loop(Filter 7: agentic_loop #26) remains the loop controller and does not classify or execute tools.Acceptance criteria
response.completedsnapshot agrees with the items previously emitted to the client.Out of scope
mcp_list_tools.failedemission (stream_events: emit mcp_list_tools.failed SSE event on MCP tool resolution failure #320).Relationships