Daemon & sessions
A session is one running conversation with an agent: its messages, tool calls, and state.
With the background service on, sessions are not owned by your terminal. They are owned by a local daemon, and every client — the TUI, the web UI, Telegram — is a thin attachment to it. Close the terminal and the agent keeps working; reattach later and you pick up the live transcript, mid-turn.
The setup wizard’s Background service choice turns this on with
service.enabled: true. Without it, BotBandit runs in-process: each session
lives inside the CLI that started it and ends when you quit. The web UI,
Telegram and the scheduler all need the daemon.
The daemon speaks HTTP+SSE over a Unix socket, so it is local by default. It starts on demand the first time a client needs it.
Managing it
boba daemon status # pid, uptime, sessions; the web and backend it runs
boba daemon logs -n 200 # recent log
boba daemon logs -f # follow
boba daemon restart # stop + start (starts it if it isn't running)
boba daemon stop # graceful stopstop and restart refuse while sessions are still running. Pass --force
when you mean it.
To run the daemon in the foreground instead — useful when you want its output in front of you, or under a supervisor like systemd or launchd:
boba daemonConfig and extension changes need a restart. The daemon builds the runtime
once at startup. After editing botbandit.config.yaml or anything in
~/.botbandit/extensions/, run boba daemon restart — otherwise you are
still talking to the old wiring.
Nothing starts the daemon at login yet. After a reboot, boba daemon restart
(or any client) brings it back, together with the web and local backend it
runs.
Working with sessions
boba # new session in the TUI
boba --profile coder # new session on a specific profile
boba run "one-shot prompt" # no TUI, prints the result
boba resume <sessionId> # reattach to an existing sessionboba run sessions are disposable: stored, but hidden from listings, and
pruned by the daemon a week after their last activity. Pass --keep to keep
one as a normal session. The retention is sessions.disposableRetentionDays.
One more session-shaped command worth knowing:
# Run a markdown document's body as a headless session (cron-friendly)
boba run-task ./daily-triage.md --profile coderrun-task is the building block for scheduled
work: the document body is
the prompt, a profile: in its frontmatter picks the model (--profile
overrides), and --json emits raw session events for piping. Its sessions are
hidden from listings and kept; --disposable files them for pruning instead.
Where a session runs
Each session is bound to a working directory. A session launched from a project
directory works there; one launched with no project lands in a neutral scratch
home (~/.botbandit/scratch) rather than wherever the daemon happens to have
been started. That matters because the daemon is long-lived and its own cwd is
an accident of how you started it.
The sessions: block in the config moves those homes (scratchDir,
projectsDir) and curates which profiles the new-session pickers offer
(profiles, defaultProfile).
Long-running commands
An agent’s shell call ends with its turn, and so does anything it started in
the background. For a server or watcher that should keep running, start it
with boba proc, which detaches it into its own process group and keeps a
record of it (no daemon involved):
boba proc start -- pnpm dev # detached; prints an id and a log path
boba proc list # what was started, and whether it still runs
boba proc stop <id> # stops it and its whole process groupThe daemon hands every agent shell a boba it can call as $BOBA_BIN, so a
tool call can run "$BOBA_BIN" proc start -- … even where boba is not on
PATH.