Claude Opus 5.5

agents-0-22-0-11-b

Claude Code's read-only tools, web search on, ludion sync on

Question

How do I make useAgentChat update the UI on every token?

Answer key

A correct answer says
`useAgentChat` throttles UI updates to every 50ms by default; pass `throttle: false` to render every chunk or a number to change the interval.
The stale answer
useAgentChat re-renders on every streamed chunk unless you set `experimental_throttle`.

The change's lesson

Answer

Pass `throttle: false` to `useAgentChat`:

```tsx
const chat = useAgentChat({ agent, throttle: false });
```

Since `agents` 0.22.0, `useAgentChat` batches streaming updates and re-renders every 50 ms by default, so you won't see each token as it arrives. This project has `agents` 0.27.0 installed, so that default applies here. With `throttle: false` the UI renders every chunk as it comes in. You can also pass a number to set a different batching interval in milliseconds, for example `throttle: 16`.

I got this from the project's `.ludion/lessons.md` notes, not from the library source. If it doesn't behave this way, check the `useAgentChat` options type in `node_modules/agents`.

Answering cost $0.09.

Grade

correct

The judge's reason: It states the 50ms default throttle, `throttle: false` to render every chunk, and a number to change the interval, without presenting the stale behavior as current.

The judge's log

Session log

What the agent wrote, the tools it called, and what they returned, from docs/bench/2026-10-11-done3/runs/B-project-sync/agents-0-22-0-11-b.jsonl. Thinking and the session's settings are left out. The raw log

  1. Agent

    Pass `throttle: false` to `useAgentChat`:
    
    ```tsx
    const chat = useAgentChat({ agent, throttle: false });
    ```
    
    Since `agents` 0.22.0, `useAgentChat` batches streaming updates and re-renders every 50 ms by default, so you won't see each token as it arrives. This project has `agents` 0.27.0 installed, so that default applies here. With `throttle: false` the UI renders every chunk as it comes in. You can also pass a number to set a different batching interval in milliseconds, for example `throttle: 16`.
    
    I got this from the project's `.ludion/lessons.md` notes, not from the library source. If it doesn't behave this way, check the `useAgentChat` options type in `node_modules/agents`.