Message Actions
Status: Running today. The behavior and per-message action rules for Desktop agent chat ship under
desktop/kernel/agent-chat-{behavior,message-action}-contract.md.
Every message in Desktop chat comes with actions — regenerate, fork, edit, and more. Each action has a precisely defined behavior: what it does, what conversation continuity it keeps, and how it runs through Runtime's turn semantics.
Behavior + Message Action Split
| Contract | Owns |
|---|---|
| Agent chat behavior | Generic behavior across messages (turn admission, retry posture, mid-stream stop) |
| Agent chat message action | Per-message typed actions (regenerate, fork, edit) |
Generic behavior — like "stopping mid-stream keeps the partial reply" — lives in the behavior contract. Per-message actions — like "you clicked regenerate on this message" — live in the message action contract.
Admitted Message Actions
| Action | What it does |
|---|---|
| Regenerate | Re-derive the agent's reply for the same anchor + turn input |
| Fork | Branch the conversation from this message; create a new anchor or sub-anchor per the contract |
| Edit | Edit the user's prior message and re-derive |
Other admitted actions per agent-chat-message-action-contract.md |
The action set is fixed and typed; app code can't invent new actions.
Boundary
| Owns | Does NOT own |
|---|---|
| Per-message action UI + typed dispatch | Turn execution (Runtime) |
| Action-induced anchor lifecycle | ConversationAnchor semantics (Runtime) |
| User-facing message action surface | Realm chat thread truth (Realm) |
Reader Scenario: User Regenerates A Reply
User clicks regenerate on the agent's last message.
- Action dispatched. Desktop emits typed regenerate action for the targeted message.
- Anchor preserved. Same
ConversationAnchor; new turn under admitted regenerate semantics. - Runtime processes. Turn lifecycle re-runs.
- New reply streams. Replaces (or stacks per contract) the previous one in the chat thread.
Reader Scenario: User Forks From A Message
User wants to explore an alternate conversation branch from this point.
- Fork action dispatched. Desktop emits typed fork action.
- New anchor created. Per the message action contract's fork semantics.
- Original conversation untouched. The user can switch between the original and the fork.
What Message Actions Do Not Do
- App code can't invent new actions.
- They don't bypass the turn lifecycle.
- They don't silently change the human chat history stored in Realm.
- They don't redefine the
ConversationAnchorshape.