Describe the Bug
In Flue v2.0.3, a successful persisted agent submission (processSubmissionInput, used by HTTP and dispatch() paths) emits a terminal operation observation without agentOutput. This diverges from a successful freeform session.prompt() operation.
Both @flue/opentelemetry and Flue's Cloudflare tracing project terminal text agentOutput into gen_ai.output.messages. Consequently, the persisted parent agent span contains the input but not the final assistant response.
This report is limited to freeform text output. Structured result data and response metadata are not currently projected into gen_ai.output.messages for direct prompts, tasks, or persisted submissions.
Expected Behavior
A successful persisted freeform submission emits terminal text agentOutput for its final assistant response through the same live-observation and GenAI projection contract used by a successful freeform session.prompt() operation.
This should not redefine the durable submission reply contract (text, data, and metadata) or add structured data or metadata to gen_ai.output.messages only for persisted submissions.
Steps to Reproduce
- Use
@flue/runtime@2.0.3 and configure Flue OpenTelemetry instrumentation with a span exporter.
- Run an agent with a deterministic/local OpenAI-compatible model through the persisted HTTP or
dispatch() submission path.
- Let the agent complete a normal freeform text response.
- Inspect the terminal parent
operation / invoke_agent span.
- Observe that
gen_ai.input.messages is present but gen_ai.output.messages is absent.
- Run an equivalent freeform
session.prompt() operation and inspect its terminal parent span. It includes gen_ai.output.messages with the final assistant text.
Additional Evidence
In v2.0.3, the persisted path flushes the response successfully, but returns no result to its enclosing runOperation('prompt', ...). The operation's terminal observation therefore cannot normalize an agentOutput. The direct freeform prompt path returns a text result through that same operation boundary.
A local real-Flue reproduction against the affected runtime with a mock OpenAI-compatible streaming model and a file-backed OpenTelemetry span processor confirmed the difference: the unmodified persisted path omitted the parent output; providing the final text at the existing operation boundary populated gen_ai.output.messages.
Example implementation: SilasMarvin#2
Describe the Bug
In Flue v2.0.3, a successful persisted agent submission (
processSubmissionInput, used by HTTP anddispatch()paths) emits a terminaloperationobservation withoutagentOutput. This diverges from a successful freeformsession.prompt()operation.Both
@flue/opentelemetryand Flue's Cloudflare tracing project terminal textagentOutputintogen_ai.output.messages. Consequently, the persisted parent agent span contains the input but not the final assistant response.This report is limited to freeform text output. Structured result data and response metadata are not currently projected into
gen_ai.output.messagesfor direct prompts, tasks, or persisted submissions.Expected Behavior
A successful persisted freeform submission emits terminal text
agentOutputfor its final assistant response through the same live-observation and GenAI projection contract used by a successful freeformsession.prompt()operation.This should not redefine the durable submission reply contract (
text,data, andmetadata) or add structured data or metadata togen_ai.output.messagesonly for persisted submissions.Steps to Reproduce
@flue/runtime@2.0.3and configure Flue OpenTelemetry instrumentation with a span exporter.dispatch()submission path.operation/invoke_agentspan.gen_ai.input.messagesis present butgen_ai.output.messagesis absent.session.prompt()operation and inspect its terminal parent span. It includesgen_ai.output.messageswith the final assistant text.Additional Evidence
In v2.0.3, the persisted path flushes the response successfully, but returns no result to its enclosing
runOperation('prompt', ...). The operation's terminal observation therefore cannot normalize anagentOutput. The direct freeform prompt path returns a text result through that same operation boundary.A local real-Flue reproduction against the affected runtime with a mock OpenAI-compatible streaming model and a file-backed OpenTelemetry span processor confirmed the difference: the unmodified persisted path omitted the parent output; providing the final text at the existing operation boundary populated
gen_ai.output.messages.Example implementation: SilasMarvin#2