Skip to content

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

ContractOwns
Agent chat behaviorGeneric behavior across messages (turn admission, retry posture, mid-stream stop)
Agent chat message actionPer-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

ActionWhat it does
RegenerateRe-derive the agent's reply for the same anchor + turn input
ForkBranch the conversation from this message; create a new anchor or sub-anchor per the contract
EditEdit 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

OwnsDoes NOT own
Per-message action UI + typed dispatchTurn execution (Runtime)
Action-induced anchor lifecycleConversationAnchor semantics (Runtime)
User-facing message action surfaceRealm chat thread truth (Realm)

Reader Scenario: User Regenerates A Reply

User clicks regenerate on the agent's last message.

  1. Action dispatched. Desktop emits typed regenerate action for the targeted message.
  2. Anchor preserved. Same ConversationAnchor; new turn under admitted regenerate semantics.
  3. Runtime processes. Turn lifecycle re-runs.
  4. 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.

  1. Fork action dispatched. Desktop emits typed fork action.
  2. New anchor created. Per the message action contract's fork semantics.
  3. 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 ConversationAnchor shape.

Source Basis

Documentation for Nimi — the installable, open-source, local-first personal AI product.