A session in Shob is a persistent, stateful conversation between you and an AI agent. Every message sent, every file the agent reads or edits, every shell command it runs, and every permission decision made is recorded inside a single session. Sessions survive process restarts, can be resumed at any time, shared with others, forked from any point in history, and compacted when the context window fills up.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shobcoder/shob/llms.txt
Use this file to discover all available pages before exploring further.
What Is a Session?
When you start Shob — either interactively through the TUI or headlessly viashob run — a new session is created automatically. The session stores:
- A unique session ID (e.g.,
ses_01jzabcxyz...) - A title that is auto-generated from the first message and refined by the
titleagent - The working directory the session is anchored to
- The complete message history, including all agent tool calls and their results
- A summary of file changes (additions, deletions, and affected files) produced at the end of the run
- Timestamps for creation and last update
Sessions are stored locally in Shob’s data directory. They are not uploaded anywhere unless you explicitly share them.
Session Lifecycle
A session is created the first time you send a message. You can also create one explicitly by starting the TUI without a message, or by running
shob run with a prompt.# Start a new interactive session
shob
# Start a new headless session with a prompt
shob run "Refactor the authentication module to use JWT"
The agent processes your message, calling tools (file reads, edits, shell commands, web searches) and requesting permissions as needed. The session accumulates a full transcript of all activity.
# Continue the most recent session
shob run --continue "Now add unit tests for the new JWT module"
# Continue a specific session by ID
shob run --session ses_01jzabcxyz "What files did we change?"
After the agent finishes, the session summary includes a diff of every file that was modified. In the TUI, you can view the timeline and inspect per-message diffs. Programmatically, the session
summary field records additions, deletions, and file counts.Session IDs
Every session receives a unique, monotonically ordered ID prefixed withses_. IDs are URL-safe and can be passed directly to CLI commands:
Listing Sessions
Useshob session list to inspect all sessions for the current project:
less (or more on Windows):
id, title, updated, created, projectId, and directory.
Deleting Sessions
Session Sharing
Sharing must be enabled in your configuration. Set
share to "manual" to allow on-demand sharing, or "auto" to share every new session automatically. Set it to "disabled" (the default if unconfigured) to prevent sharing entirely.shob.json
none by default — set it in your keybinds config) or the --share flag on shob run:
share.url field on the session object holds the public URL once the session is shared.
Context Window Management and Compaction
Every AI model has a fixed context window — the maximum amount of text it can process in a single request. As a session grows, it will eventually fill that window. Shob handles this automatically through compaction. When the context is approaching its limit, Shob invokes the internalcompaction agent to summarise the conversation so far. The summary replaces the oldest messages, keeping the most recent context and carrying forward the key information needed to continue the task.
You can tune compaction behaviour in shob.json:
shob.json
| Option | Default | Description |
|---|---|---|
auto | true | Trigger compaction automatically when the context window is full |
prune | true | Remove old tool outputs to free tokens before a full compaction |
profile | "default" | Compaction style: default, comprehensive, technical, or minimal |
<leader>c).
Session Forking
Forking creates a new session that starts from an exact point in the history of an existing session. All messages up to (and not including) the fork point are copied into the new session. The original session is left untouched.none — bind it in your keybinds config) to fork from any message in the timeline.
Forked sessions get a title derived from the original: "Refactor auth module (fork #1)", "Refactor auth module (fork #2)", and so on.
Child sessions and session trees
Child sessions and session trees
Sessions can be nested. When an agent spawns a subagent to work on a sub-task, that subagent runs inside a child session with a
parentID pointing back to the parent. The TUI shows child sessions indented beneath their parent and provides keybinds to navigate the tree (session_child_first, session_child_cycle, session_parent).Child sessions are deleted recursively when their parent is deleted.