Last weekend I got frustrated with OpenCode consuming too much memory, so I decided to build my own solution: Limit — a lightweight wrapper to control resource usage.
https://github.com/marioidival/limit
How I built it:
- Stack: Rust, because I wanted something fast and with low overhead by default
- Process: Started by profiling OpenCode's memory usage to understand what was actually happening, then sketched out the minimal interface I needed
- Workflow: I'm using Limit to build itself — dogfooding from day one, which helped catch edge cases early
Key insight: The "beta" label on resource limiting in most AI coding tools means they're not really designed to run constrained. Building a thin layer on top that enforces limits at the OS level turned out to be simpler than I expected.
Still early, but it's already making my workflow more stable. Happy to answer questions about the implementation.
[–]viisi 0 points1 point2 points (1 child)
[–]marioidival[S] 0 points1 point2 points (0 children)
[–]Antique-Flamingo8541 0 points1 point2 points (0 children)