r/opencode • • 1d ago

I run OpenCode unattended as a background PR worker, sandboxed with no Git credentials. Open-sourced the setup.

I wanted OpenCode and a local model handling small tasks on my repos while I did other things, without giving the agent my Git token or my host filesystem.

So I built GitSeed (Apache 2.0, self-hosted). Each task runs in three containers:

  • prepare clones the repo and strips credentials
  • agent runs OpenCode as non-root, with all Linux capabilities dropped, behind an egress proxy, with no Git token
  • finalize mounts the workspace read-only, blocks edits to protected paths, scans the diff for secrets, then commits and opens the PR

OpenCode-specific bits:

  • Works with Ollama, vLLM or LM Studio through LiteLLM, so it can run fully air-gapped
  • Hard per-run dollar caps when you use API keys
  • You can drop into the live session in a browser terminal or VS Code Web and steer it mid-run

Honest limits: it builds images locally for now, and it's a Docker setup, so it's likely overkill if you just pair with OpenCode interactively in one repo.

Repo: github.com/gitseed-dev/gitseed

I'd especially like feedback from anyone running OpenCode with local models, which ones have you found reliable enough for unattended changes?

17 Upvotes

1 comment sorted by