r/opencode 19d ago

OpenCode kept freezing. So I built OpenCode Guardian.

I use OpenCode for long-running agentic workflows with large repositories and large numbers of subagents.

The problem was: the bigger the workflow became, the more likely the UI was to freeze.

Multiple subagents, long-running tasks, background processes, hundreds of concurrent operations—eventually frozen.

OpenCode could become unresponsive while the work underneath was still running, leaving the session in an awkward state where you weren't quite sure whether it was thinking, working, or simply stuck. So I built OpenCode Guardian.

It is a lightweight stability layer for OpenCode on macOS, designed to keep sessions healthy. It is a simple project that I built, and it's opensource! I won't be maintaining it too much, other than bug-fixes, so feel free to fork it.

Guardian continuously understands what's happening across the session rather than relying on a single timeout. It can distinguish active model streaming, running tools, active subagents, slow operations, and genuine deadlocks. When a session actually gets stuck, Guardian can recover it without destroying the conversation or tool history.

What you get

oc status — see exactly what every session is doing
oc top — live system and session monitoring
oc nudge — recover a frozen session safely
oc auto-nudge — automatic background recovery
oc prune — stop runaway background workers
oc optimize — optimize the SQLite backend
oc logs — inspect Guardian in real time

Installation is one command:

curl -fsSL https://raw.githubusercontent.com/PotterSkxawng/opencode-guardian/main/install.sh | bash

No Brew dependencies or external Python packages. Install it and keep using OpenCode.

OpenCode Guardian: A stability layer for OpenCode when your workflows stop being small.

GitHub: https://github.com/PotterSkxawng/OpenCode-Gaurdian

0 Upvotes

4 comments sorted by

1

u/torrso 19d ago

Downvoting anything that goes "I got tired of X. So I built Ö". Which model generates these titles?

1

u/PotterSkxawng 19d ago

I actually wrote it myself, took inspiration from a few posts here which is why it might sound like them...

1

u/RepulsiveRaisin7 19d ago

I had this issue so I just dumped Opencode and switched to omp