Skip to content

Editing Messages

While the agent is running, you can compose and queue additional messages. They will be delivered to the agent one at a time, in the order they were queued, after the agent finishes its current turn. This lets you:

  • Line up several follow-up instructions without waiting for each one to complete.
  • Change your mind and edit or remove a queued message before it is acted on.
  • Send a message immediately, skipping the queue, if you need the agent to act on it right away.

Queued messages are persisted to disk (queued_messages.json inside the task directory), so they survive a reload.

When you press Enter, the submitted text and attachments clear from the composer immediately, even if Kodik must compact context or finish other admission work before the model turn starts. If that admission fails before the message is accepted, Kodik restores the draft as long as you have not started typing a replacement.

While a response is running, the composer shows only the Stop button. Press Enter to queue the draft you typed; use the queued message card to edit, remove, or send it immediately.

Pressing Escape anywhere on the Chat Page while a follow-up is queued sends it immediately: the current stream stops and the queued message starts the next turn (any other queued messages join it), the same as the queued bubble’s send-now action. Stopping the stream itself always takes two Escape presses: the first replaces the Stop icon with ESC inside the same round button, and a second press within a couple of seconds stops the turn.

Send now does not roll back work that tools already completed. The next turn keeps those tool calls and results in context. If a tool was still running when the turn stopped, Kodik tells the agent that it may have partially executed so the agent can inspect the current workspace before retrying it.

Built-in slash commands keep their command behavior instead of being sent to the model as normal text. If you submit /compact while the agent is still running, Kodik compacts the conversation immediately and fences off late results from the old turn. /newtask also stays a command rather than becoming queued chat text.

If Kodik is waiting for tool approval and you type a replacement message, Kodik starts that replacement turn immediately. Older queued drafts stay in the queue for you to edit, remove, or send manually, and do not silently run after the replacement turn finishes.

Editing a Sent Message (Checkpoint Restore)

Section titled “Editing a Sent Message (Checkpoint Restore)”

If the agent has already acted on a message you want to change, use the checkpoint restore flow instead. This rewinds both the conversation history and the file state to the point just before that message was processed, then lets you re-send a revised version.

If you edit while the previous response is still streaming, Kodik stops that response as part of the restore and sends the revised message immediately; it is not left in the message queue.

The revised turn’s complete answer stays in the transcript as soon as the turn finishes. Background session recovery does not append a delayed answer after Chat has already returned to idle.

See Checkpoints for details.