> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch44-design-themes/44.5-conversation-experience-as-first-class.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 44.5 Conversation Experience as a First-Class Engineering Object

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~195,000 tokens, Output \~10,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

The last theme, and the most underrated.

Most agent frameworks treat "conversation" as a function call: message in, reply out. OpenClaw treats it as an **interactive system with a real user mental model**, and writes a lot of code for it. None of that code scores a point on a benchmark; all of it decides whether the thing is pleasant to use.

## 44.5.1 Three Queueing Semantics for Three Real Mental Models

A user sends another message while the agent is still working. What should happen?

Most frameworks offer two answers: queue it until done, or reject it. OpenClaw offers three modes, each matching a real conversational intent:

| Mode         | User's mental model                                           | System behavior                                                                                                           |
| ------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **steer**    | "Wait — I misspoke / changed my mind"                         | Checks the queue **between tool calls**; on a new message, injects it into the current run and skips remaining tool calls |
| **followup** | "Also, one more thing"                                        | Waits for the current turn to finish; the new message starts the next turn                                                |
| **collect**  | (fragment burst) "look up" + "Beijing" + "tomorrow's weather" | Debounces and merges into one message, then starts a turn                                                                 |

The three mental models are entirely distinct — **interrupting, following up, and thinking out loud in pieces**. Handle all three with one queueing strategy and two of the experiences are necessarily bad.

### steer's implementation deserves a closer look

Its check granularity is **between each tool call**:

```
user message → agent starts running
              ↓
          tool call 1  ← done; check queue
              ↓          new message? → skip remaining tools, inject
          tool call 2  ← done; check queue
              ↓
          tool call 3
              ↓
          generate reply
```

Skipped tool calls receive an explicit error result: `Skipped due to queued user message`. That detail is critical — **the model needs to know why those tools have no results**, or it gets confused and retries.

This is a minimal implementation of an *interruptible agent*. Picture the alternative: you ask the agent to analyze a 500-line log file, then realize you got the path wrong, and can only watch it read the entire wrong file, analyze it, and reply — before you get to say "wrong path."

> See §13.3, §15.3.

## 44.5.2 Two-Tier Lanes: 300 Lines of Promises Solving Three Problems

Concurrency control is the other piece of cleverness here. Three constraints that appear to conflict:

1. **The same session must be serial** — two messages from one person can't be processed in parallel, or the context corrupts;
2. **Global rate limiting** — ten groups messaging at once must not fire ten LLM requests;
3. **Background tasks must be isolated** — scheduled jobs must not block foreground conversation.

OpenClaw's answer is two nested queues:

```
┌─ global lane (concurrency N) ────────────┐
│                                          │
│   ┌─ session lane A (concurrency 1) ─┐   │
│   │  msg1 → msg2 → msg3              │   │
│   └──────────────────────────────────┘   │
│                                          │
│   ┌─ session lane B (concurrency 1) ─┐   │
│   │  msg1 → msg2                     │   │
│   └──────────────────────────────────┘   │
│                                          │
│   ┌─ background lane ────────────────┐   │
│   │  cron job                        │   │
│   └──────────────────────────────────┘   │
└──────────────────────────────────────────┘
```

`session lane (concurrency 1) ⊂ global lane (concurrency N)`.

Intra-session serialization comes from the inner layer, global rate limiting from the outer, and background tasks run in their own lane without competing for foreground capacity. Three constraints satisfied by one nested structure.

The implementation is the notable part: **about 300 lines of pure Promise code**. No worker threads, no Redis, no external queue service.

That's the footnote to this section's title — conversation experience is treated as a first-class engineering object, but **that doesn't mean dragging in heavyweight infrastructure**. The complexity here is the complexity of *thinking it through*, not of *stacking components*.

> See Chapter 13, §15.3.

## 44.5.3 Draft Streaming: Making a Reply Look Like Typing

On a chat platform, generating a long reply takes ten-plus seconds. What does the user see during them?

The worst option is nothing, followed by a sudden wall of text. OpenClaw's approach is **draft streaming** — send one message, then continuously edit that same message as generation proceeds. The user watches text grow, as if someone is typing.

Three mechanisms are required:

| Mechanism                | Problem it solves                                                                               |
| ------------------------ | ----------------------------------------------------------------------------------------------- |
| **Single-flight**        | Only one edit request in flight at a time, or the platform rate-limits or reorders              |
| **Latest snapshot**      | Each edit carries the *current full text*, not a delta, so it self-heals after dropped requests |
| **Throttling coalescer** | Generation far outpaces the platform's allowed edit frequency; merging is mandatory             |

*Latest snapshot rather than delta* is the key design here. With deltas, one dropped packet corrupts everything after it; with full snapshots, any successful edit corrects the state. **Over an unreliable channel, shipping snapshots is far more robust than shipping deltas.**

Plus the degradation chain from §44.2: draft stream unavailable → dual-channel fallback → race-generation protection.

> See §18.2, §18.4.

## 44.5.4 The Heartbeat's "Traceless" Design

The last example is the subtlest.

OpenClaw has a heartbeat: periodically wake the agent to check whether anything needs doing (remind you about a meeting, say). The question is — **if it checks and finds nothing, does that heartbeat pollute the session?**

It would. The session gains a round of "user: check / assistant: nothing going on," `updatedAt` gets bumped, and that conversation jumps to the top of your session list. Over a day, session history fills with these empty spins.

OpenClaw's answer is to leave **no trace at all** when nothing happened:

1. **Roll back the `updatedAt` timestamp** — session list ordering unaffected;
2. **Trim that turn out of the transcript** — session history stays clean;
3. **Silent suppression** — no user-visible output.

Three steps, and a "nothing happened" heartbeat is, as far as the system is concerned, something that never happened.

This is the kind of code **only written by someone who has actually used their own product for a long time**. It fixes no bug and adds no feature; it exists purely so background automation doesn't disturb foreground conversation.

> See Chapter 26, Chapter 34.

## 44.5.5 Distilled

Putting the four examples together, the shared instinct is:

> **Model the user's mental state first, then design system behavior — rather than making the user adapt to your implementation.**

* Users have three interruption mental models → provide three queueing semantics (not one called "queue")
* Users can't tolerate a ten-second blank screen → build draft streaming (not "please be patient")
* Users don't want background jobs dirtying their history → build traceless turns (not "this is normal")

Each is *write a few hundred more lines so the user is slightly less annoyed*. For agent products this class of engineering is badly undervalued — because it shows up on no evaluation metric, only in whether people are willing to use the thing every day.

For readers building similar systems, one practical note: **build these after you have real users, but reserve the architectural slots up front.** Queueing semantics require the agent loop to expose a hook *between tool calls*; draft streaming requires the channel layer to support message editing. Retrofitting either position is painful.

***

## Section Summary

1. **Three queueing semantics map to three real mental models**: steer (interrupt — checks between each tool call, skipping remaining tools with `Skipped due to queued user message`), followup (add-on), collect (fragment burst, debounced and merged).
2. **Two-tier lanes solve three constraints with \~300 lines of pure Promise code**: `session lane(1) ⊂ global lane(N)` plus an isolated background lane — serialization, rate limiting, and isolation, with no workers and no external queue.
3. **Draft streaming** runs on single-flight + latest snapshot + throttling coalescer; *snapshot instead of delta* is the key choice on an unreliable channel.
4. **The heartbeat's traceless design**: on a no-op, roll back `updatedAt`, trim the transcript, suppress output — background automation must not pollute foreground conversation.
5. The shared instinct is **model user mental state first, then design behavior**; the practical note is that these can be built later but **the architectural hooks must be reserved early** (inter-tool-call checkpoints, message-edit capability).
