Agent.session.run returns stream_id on Anna platform, but no rpc.stream frames are delivered to the app iframe

Hi Anna team,

I am seeing an issue with the Anna App Agent session streaming path on the hosted Anna platform.

My app, anna-presenton (name and slug are both anna-presenton), has been uploaded successfully. The same Agent session flow works in local anna-app dev, but on the Anna platform the Agent run never streams any content back to the app iframe.

The relevant app-side flow is:

const session = await runtime.agent.session({ submode: "auto" });

try {
  const stream = session.run({ content: prompt });

  for await (const frame of stream) {
    // Parse model tokens, tool activity, task_complete, errors, etc.
    // Append content frames to the UI.
  }
} finally {
  await session.delete().catch(() => undefined);
}

In the actual app code, this is wrapped with a timeout and retry handling, but the core lifecycle is:

  1. create an Agent session with runtime.agent.session({ submode: "auto" })
  2. run it with session.run({ content })
  3. consume frames from the returned async iterable
  4. delete the session in finally

The relevant code is equivalent to this:

async function collectRunText(session, content, options) {
  let output = "";
  const events = [];

  const stream = session.run({ content });

  for await (const frame of stream) {
    if (frame.event === "complete") {
      break;
    }

    const frameEvents = extractFrameEvents(frame);

    for (const event of frameEvents) {
      events.push(event);
      options?.onStreamEvent?.(event);

      if (event.type === "content") {
        output += event.text;
      } else if (event.type === "error") {
        throw new Error(event.message);
      }
    }
  }

  return { text: output, events };
}

To isolate the problem, I tested a minimal prompt:

Reply with exactly OK. Do not use tools.

On the Anna platform, the Agent session is created successfully and session.run also returns quickly with a run_id and stream_id:

{"event":"host.request","ns":"agent","method":"session.create","args":{"submode":"auto","label":"frontend-agent-debug"}}
{"event":"host.response","ns":"agent","method":"session.create","elapsed_ms":223,"result":{"app_session_uuid":"aps_otvzta4dbqcgxokbeaeuo2","expires_in":600,"submode":"auto","fixed_client_id":null,"granted_tools":[]}}

{"event":"host.request","ns":"agent","method":"session.run","args":{"app_session_uuid":"aps_otvzta4dbqcgxokbeaeuo2","content":"Reply with exactly OK. Do not use tools."}}
{"event":"host.response","ns":"agent","method":"session.run","elapsed_ms":150,"result":{"run_id":"9b21348a-f2ba-42f3-99a9-ec2739a9691a","stream_id":"strm_535508a3b62d4b24"}}

However, after that, no rpc.stream events are delivered to the iframe. After waiting 90 seconds, the app times out:

{"event":"ui.action.error","error":{"message":"agent.session.run stream timed out after 90000ms"}}

In local anna-app dev, the same code and same prompt work correctly. After session.run returns a stream id, the app receives rpc.stream events:

{"event":"agent.session.run.stream","payload":{"stream_id":"dev-2","seq":1,"payload":{"choices":[{"delta":{"task_info":{"status":"running"}}}]}}}
{"event":"agent.session.run.stream","payload":{"stream_id":"dev-2","seq":2,"payload":{"choices":[{"delta":{"processing_started":{...}}}]}}}
{"event":"agent.session.run.stream","payload":{"stream_id":"dev-2","seq":3,"payload":{"choices":[{"delta":{"content":"OK"}}]}}}
{"event":"agent.session.run.stream","payload":{"stream_id":"dev-2","seq":4,"payload":{"choices":[{"delta":{"task_complete":{...}}}]}}}
{"event":"agent.session.run.stream","payload":{"stream_id":"dev-2","seq":7,"payload":{"event":"end"},"done":true}}

So the hosted platform behavior appears to be:

  • agent.session.create succeeds
  • agent.session.run succeeds and returns { run_id, stream_id }
  • but the subsequent rpc.stream events for that stream_id are never delivered to the Anna App iframe

This makes the app appear stuck while waiting for the Agent response.

Could you help check whether hosted Anna is currently forwarding Agent stream events back into Anna App iframes? Specifically, I think one of these may be failing:

  1. the backend does not publish rpc.stream events for the returned stream_id, or
  2. the dashboard/runtime host receives them but does not forward them to the app iframe via postMessage, e.g. as:
iframe.contentWindow.postMessage({
  kind: "event",
  event: "rpc.stream",
  payload,
  wid: windowUuid
}, "*");

The local harness seems to do this correctly, but the hosted platform does not appear to deliver any stream frames to the iframe.

Environment:

  • App name: anna-presenton
  • App slug: anna-presenton
  • Hosted platform: https://staging.anna.partners/dashboard
  • Runtime SDK: /static/anna-apps/_sdk/latest/index.js
  • agent.session.run returns quickly with a valid run_id and stream_id
  • No rpc.stream frames arrive in the app iframe on hosted Anna
  • Same app-side Agent session consumption pattern works locally with anna-app dev

Thanks.