- New investigations start in the background
- The shell stays free for follow-up questions
- Completed RCAs are kept and can be looked up later from the shell or chat
- Completion notifications can go to email (SMTP), Telegram (Telegram), Rocket.Chat (Rocket.Chat), Buzz (Buzz), or any combination of those
In-flight jobs stop if the shell exits. Completed RCAs are kept, and you can look
them up later from the shell or from a chat channel.
POST /api/investigations and
OPENSRE_INVESTIGATION_WORKER). For that path, see the HTTP API.
Commands
From Telegram, Slack, or Discord, use
/background status, /background list,
/background show <task_id>, or /background notify list to look up a finished
RCA. Starting investigations, promoting an RCA with /background use, and
changing channels remain shell-only. The completion notification includes the
task ID needed for /background show.
There is no opensre background … CLI command. Background mode is interactive
shell only.
Typical flow
- Start the interactive shell (
opensre). - Turn on background mode:
- Choose where the finished RCA is delivered. Channels start empty — if you skip this step, no notification is sent:
- Start an investigation:
- Keep using the shell while the RCA runs. You can check progress with
/background listor/tasks, and stop a run with/cancel <task_id>. - When it completes:
- Inspect it with
/background show <task_id> - Adopt it as active follow-up context with
/background use <task_id>
- Inspect it with
What a completed job stores
Each finished background job keeps:- Root cause
- Top analysis items
- Recommended next steps
- Internal stats:
- Tool call count
- Investigation loop count
- Validity score
/background show <task_id> prints status, command, root cause, top analysis,
next steps, and notify results. It does not print the internal stats table.
Those stats are included in notification messages (email, Telegram, Rocket.Chat, Buzz)
when a channel is configured.
Completion notifications
Notifications are off by default. Set channels with/background notify set.
All channels send the same summary structure: Root cause, Top analysis,
What to do next, plus a short internal stats section. Telegram, Rocket.Chat,
and Buzz messages are plain text and are capped at the 4,096-character
limit (sections may be shortened to fit). Email can carry a fuller version of
the same content.
Check what was delivered with
/background show <task_id>. The notify row
shows one result per channel — sent, failed: <error>, or a setup hint such
as missing telegram integration: TELEGRAM_BOT_TOKEN is not set.
A notification problem never fails the investigation. If a channel is missing
or delivery errors, the RCA still completes, stays in
/background list, and
can still be promoted with /background use.Scheduled Tasks (Cron)
Recurring scheduled tasks created withopensre cron add execute automatically in the background while the scheduler daemon (opensre cron start) or gateway is running.
Cron delivery supports a different set of providers than background notifications:
- List active cron tasks: Run
opensre cron listto view all configured tasks and their next fire times. - View execution history: Use
opensre cron logs <task_id>to see the execution history, statuses, and any errors for a specific task. - Interactive shell loops: If you use
/loops add, you can check their status using/loopsand view recent messages with/loops messages.
Product Gaps & Proactive DeliveryProactive Slack delivery and further enhancements to chat-based monitoring are currently tracked in product task T-SR-12. These gaps will be addressed as part of that upstream work.
Session lifecycle
- Jobs are not saved across REPL restarts. Exiting the process stops in-flight work and clears tracked jobs.
/newclears tracked jobs and turns background mode off. Notification channel preferences are kept (like trust mode), until you change them with/background notify set.- Completing a job does not automatically replace your active follow-up
context. Run
/background use <task_id>to promote a finished RCA.
Current limits
- investigations can only be started from the interactive shell; chat can look
them up but not launch one, and there is no
opensre background …CLI command - in-flight jobs stop if the shell exits; only completed RCAs are kept
/background useneeds the shell, because the full investigation state it promotes is not part of what gets kept- completion does not automatically replace your active follow-up context
- you must run
/background use <task_id>to promote a finished RCA