ResearchUpdates

Reducing time to first token in Chat and Remote

Parallel turn setup, live replies across devices, a shorter path from phone to computer, and warm coding agents.

Scroll down

This week's releases shortened the wait between pressing Send and seeing a reply start, in Chat on every device and when a phone sends work to a paired computer. The changes below shipped between October 15 and 21, and AI Integrator now records how long the first token takes on the computer, so the next round can be measured against this one.

Where the time goes before the first token
  • Send. Phone, web or desktop
  • Prepare. Memory, context, files, plugins
  • Start or reuse. Agent process and session
  • Model. Provider starts the reply
  • First token. Shown on every device
  • Send to Prepare
  • Prepare to Start or reuse
  • Start or reuse to Model
  • Model to First token

Chat

Before a reply can start, the server gathers what the model needs: saved memories, the Agent's instructions, the turn's context, any files, connected plugins, and memory tags. Those seven reads used to run one after another. They now run at the same time, so the setup takes as long as the slowest read instead of the sum of all of them. Plugin connections are usually the slowest. When a plan does not include the Files library, the files read is skipped entirely.

The cost of each step is now estimated once per turn. The system prompt and tool definitions are sized at the start, instead of on every step of a turn that uses tools.

A reply now appears on your other devices while it is being written. The growing reply is sent over a private realtime channel every 200 milliseconds. Before, other devices waited for the saved copy, which was written once a second. Stop uses the same channel and arrives immediately, and the once-a-second check it replaces now runs every five seconds as a backstop.

Send now interrupts a running reply. A message sent while a reply is being written waits its turn, and Send now stops the current reply and starts the new one in its place.

Remote

When a phone sends a message to a coding agent on a paired computer, three changes shorten the path:

  • The computer starts the turn itself. For a chat that is not open on the computer's screen, the desktop app now connects the agent and starts the turn directly, without first waking the app window to do it. The window path remains for chats that need it, such as the one on screen.
  • The computer acts sooner. A message from the phone is handed to the agent as soon as it is accepted, before the updates for the phone are prepared.
  • One less round trip. The wake-up now carries the queued message itself, so the app does not ask for it again.

A fourth change finished this week and is coming in the next release: when one computer views another, its session with that computer is renewed in the background before it expires, so requests do not wait on a new handshake.

Coding agents on the computer

These changes apply to any turn in Code, including one sent from a phone:

  • Codex tools load while you type. Codex's MCP servers start loading as soon as the message box is in use. In development testing on one PC, the first turn's wait dropped from 9 to 14 seconds to 2 to 3 seconds.
  • Claude Code stays running between turns. The Claude Code process is kept for up to five minutes after a turn, at most two at a time. In development testing, starting a new process took 0.8 to 0.97 seconds, and sending to a running one took 15 to 63 milliseconds.
  • Sessions start early. For Codex, Grok, Kimi and OpenCode, a session starts when the message box is focused or shortly after the chat opens, so it is ready when you press Send.
  • Less repeated setup. Codex's configuration is reused for up to a minute while its files are unchanged, skill files are reused while unchanged, and setup steps that do not depend on each other now run at the same time.

Measuring it

With detailed logging on, the desktop app now writes a record for each turn with the time to first token and the time spent in each phase: preparing, sending the request, starting or reusing the agent, and the agent being ready. In this week's records, AI Integrator's own preparation took between 8 and 252 milliseconds, and most of the remaining time belonged to the agent and its model provider.

These records cover the computer only. They start when the desktop app receives the request, so time spent on the network and on the phone is not included yet. Measuring the full path from a phone tap to the first token is next.