Import and export context
Chats are not locked into Loach. You can copy a conversation out as Markdown, paste context into any chat, and fork a chat to branch it. For a full backup of everything, see Data management.
Export context
From the chat header’s … menu, pick Export context (or type /export). A dialog shows the conversation as Markdown - the chat’s title, provider and model, its own instructions, then a ## You, ## Assistant or ## System section per message - with a Copy button. Nothing is written to disk: paste it into a notes app, a doc, another tool or another Loach chat.
The Compact context toggle swaps the verbatim transcript for a summary written by the chat’s model - handy when you want to hand another tool the gist without the full back-and-forth. It needs at least six messages, costs one model request, and leaves your actual chat unchanged. To shrink the live chat instead, see Context compaction.
The verbatim export leaves out imported messages you hid from the transcript (see below), so you don’t unknowingly share context you tucked away. The compact summary is written from everything the model sees, hidden imports included.
Import context
From the same menu, pick Import context (or type /import) and paste exported Markdown, JSON or just plain text. Loach detects the format as you paste and shows how many messages it will add before you click Import:
- Markdown -
## You,## Assistantand## Systemsections, the shape Export context produces. Anything above the first section, such as the title and instructions, is skipped. - JSON -
{ "messages": [{ "role": "user", "content": "…" }, …] }, a bare array of messages, or a single message object. Common role names (user,assistant,you,ai,bot,model) and text content blocks are understood. - Plain text - anything else becomes one user message. A compacted export has no message sections, so it arrives this way too.
The messages are appended to the end of the current chat as new turns; the previous conversation is preserved. Imported system turns are kept too, brought in as user turns so the model still sees them. Import context is unavailable while a reply is still streaming, and Regenerate isn’t offered on an imported reply.
This is the right tool for stitching together two related threads, picking up where another tool left off, or re-using a long transcript as the seed for a new line of questioning.
A Hide from transcript toggle folds the imported messages into a single collapsed Imported context card instead of listing them inline - either way the model still receives them in full, so the toggle only changes what you see. Expand the card to read them, or remove the whole batch from the chat with the card’s remove button. Hidden turns stay out of search and the in-chat finder.
Fork a chat
Fork this chat clones a conversation into a brand-new chat - same title, model, Space, sidebar folder, working folder, instructions and parameters, plus its Library sources, how those sources reach the model and its image scaling - so you can branch a tangent without disturbing the original. Fork it from the chat header’s … menu, with Fork from here in an assistant reply’s … menu (which copies the conversation up to and including that reply), or with the /fork slash command. While a reply is still streaming, the header item is greyed out (Wait for the reply to finish) and /fork says so; Fork from here is greyed out only on the reply that’s still streaming, so you can still fork from an earlier one. The new chat carries a “Forked from …” badge in its header that jumps back to the source; the badge disappears if you delete the original.
If the source chat was compacted and you fork from a point before the end of the compacted part, the summary would cover turns the fork doesn’t have - so the fork drops it and sends the turns it does copy in full again.