Overview
ollim-bot has two fork types:- Interactive forks — you enter a branched conversation, talk to the agent, and choose how to exit. All messages route to the fork until you end it.
- Background forks — the scheduler runs a task on a disposable
forked session. Output is discarded by default; the agent uses
ping_user,discord_embed, orreport_updatesto surface results.
Interactive forks
- Slash command
- MCP tool
Use If no topic is given, the agent waits for you to lead.
/fork to start an interactive fork with an optional topic:| Button | Style | Action |
|---|---|---|
| Save Context | Green | Promotes fork to main session |
| Report | Blurple | Reports summary, discards fork |
| Exit Fork | Red | Discards fork, returns to main |
Replying to a message sent by a background fork starts an
interactive fork that resumes from that background fork’s session.
This lets you pick up where a background task left off and continue
the conversation interactively.
Exit strategies
Every interactive fork ends with one of three actions. You can trigger them via the buttons on the fork embed, or the agent can call the corresponding MCP tools directly.Save context
Save context
Promotes the fork to the main session. The forked client replaces
the main client, and the old main session is disconnected. All
conversation history from the fork becomes the new main session.
- Button: Save Context
- MCP tool:
save_context(no parameters)
Report updates
Report updates
Appends a short summary to
~/.ollim-bot/state/pending_updates.json
and discards the fork. The summary is injected into the next
main-session message, so you get the findings without the full
context.- Button: Report (agent is prompted to call
report_updatesbefore exit) - MCP tool:
report_updates(message)—messageis required
Exit fork
Exit fork
Clean discard. The fork is disconnected and the main session
resumes as if the fork never happened. No context is preserved.
- Button: Exit Fork
- MCP tool:
exit_fork(no parameters)
Idle timeout
Interactive forks have an idle timeout to prevent abandoned forks from blocking normal conversation. The default is 10 minutes, configurable via theidle_timeout parameter on enter_fork.
The timeout works in two stages:
- First timeout — after
idle_timeoutminutes of inactivity, the scheduler prompts the agent to decide on an exit strategy. The agent may choose to save, report, or exit. - Second timeout — if another
idle_timeoutperiod passes with no activity after the prompt, the agent receives a “you MUST exit” message. The agent always decides the final exit strategy; there is no forced auto-exit.
touch_activity(), which is called after
each user interaction in the fork.
Background forks
Background forks run scheduled tasks (routines, reminders) on disposable forked sessions. They differ from interactive forks in several ways:| Aspect | Interactive | Background |
|---|---|---|
| Started by | User (/fork) or agent (enter_fork) | Scheduler (routines/reminders) |
| Lock | Requires agent.lock() | Runs without lock |
| Output | Streamed to Discord | Discarded (use ping_user/discord_embed to alert) |
| Timeout | Idle timeout (default 10 min) | Hard timeout (30 minutes) |
save_context | Available | Blocked |
report_updates | Available | Available (controlled by update_main_session mode) |
| Concurrency | One at a time | Multiple can run concurrently |
ping_user and discord_embed calls return errors, and the agent
uses report_updates instead.
For full background fork configuration (isolated mode, model
overrides, tool restrictions, update_main_session modes,
allow_ping), see Background forks.
Pending updates
Pending updates are the bridge between forks and the main session — when a fork callsreport_updates(message), the summary gets
prepended to the next main session interaction. See
Context flow for the full pending
updates cycle and update_main_session modes.
Next steps
Background forks
Background fork configuration — isolated mode, model overrides,
tool restrictions, and reporting modes.
Slash commands
All Discord commands, including
/fork and /interrupt.Conversations
How the main conversation works, including reply-to-fork behavior.
Ping budget
How background forks manage notification limits.
