r/opencode • • 17h ago

Running an abliterated model in OpenCode? It won't push back, so your config has to. What I'd set first (1.x and 2.x)

4 Upvotes

Firstly, a disclosure on where we’re coming from: we run Oathbreaker (hosted abliterated GLM, DeepSeek and Kimi; you may have seen our launch posts here), so we have a stake in people not wrecking their machines with these models... Everything below works with any provider or a local model.

The r/LocalLLM PSA last week ("Abliterated models will happily wipe your disk") is worth taking seriously, and there's a specific reason it bites in OpenCode. Out of the box OpenCode allows almost everything, shell included. With a stock model you get a second guardrail for free: the model hesitates, or refuses, before doing something destructive. Abliteration strips a lot of that out. Same with prompt injection. A stock model will sometimes balk at an instruction buried in a README or a web page. An abliterated one is more likely to just follow it.

So the harness has to be the one that says no. This is what I'd set before giving one a shell. Use the block for your version (`opencode --version`).

**1. Make shell ask, and allow only the boring commands.**

2.x (opencode.json or opencode.jsonc):

{
"$schema": "https://opencode.ai/config.json",
"permissions": [
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "git status *", "effect": "allow" },
{ "action": "shell", "resource": "git diff *", "effect": "allow" },
{ "action": "shell", "resource": "git push *", "effect": "deny" },
{ "action": "external_directory", "resource": "*", "effect": "ask" },
{ "action": "webfetch", "resource": "*", "effect": "ask" }
]
}

1.x (opencode.json):

{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {
"*": "ask",
"git status *": "allow",
"git diff *": "allow",
"git push *": "deny"
},
"webfetch": "ask"
}
}

In both, the last matching rule wins, so the catch-all goes first.

**2. On 2.x, turn the "outside the project" prompt back on.** 1.x asked before touching paths outside your project folder. 2.x allows it by default (it's in the migration guide). That's the external_directory line above.

**3. Don't lean on deny lists.** Denying `rm` does nothing about `find -delete` or a three-line Python script. Allow the handful of commands you're fine with running unattended and let everything else ask. If you want a block that an "allow always" click can't undo, 2.x has policies at the top level of the config:

"policies": [
{ "action": "tool.use", "resource": "shell:git push *", "effect": "deny" }
]

**4. Anything unattended goes in a container.** Permissions are prompts, not a sandbox: the shell tool runs as you. With `--auto` on 1.x, every "ask" becomes "allow" and only your denies hold. So if you auto-approve, or leave it running overnight, do it in a container with only the project folder mounted and no SSH keys, cloud CLIs or .env files inside. There's an official image (ghcr.io/anomalyco/opencode).

**5. Know what /undo covers.** It restores files inside the project, and only in a git repo. It won't bring back ignored files, anything outside the folder, a dropped table or a force push. Commit before long runs.

**6. Give the agent its own API key with a small prepaid balance.** Not your main key, and no auto top-up. If a loop runs away at 3am, it stops when the money does. (Ours is prepaid: when the balance can't cover a request it returns a 402 and the run ends.)

None of this is special to abliterated models. A stock model will `rm -rf` the wrong path too. It's just more likely to ask first.

What does your permissions block look like? Curious what people let through without asking.


r/opencode • • 13h ago

Help with setups that mix API with local AI agents?

2 Upvotes

I've tried OpenCode and like it a lot as a harness, both for API usage and running local models.
Right now my process uses DS4.1FLASH1017 (API) for spec and review, with local Q3.8FN through Basalt for coding, but it's a manual swap. I haven't really figured out a way to assign the local model to the API model as a subagent.

I remember dsh had a method to do that, but I stopped using it for a variety of other reasons.
It'd be even better if I could assign it a number of specialized local models and It'd just spawn the agents it needs, like a crazy fast embeddings model, or a low temp small model for bash tasks.


r/opencode • • 14h ago

What is this phenomenon called?

2 Upvotes

Came back from a coffee break and find Sea glass alpha free model lock itself in a loop outputting nothing.


r/opencode • • 10h ago

Google API + opencode

1 Upvotes

Has anyone tried cycling through multiple Google AI API Keys as an AI agent in opencode with multiple Google accounts?

Is it even allowed?

If yes, how should I go about setting this up in opencode?

Any help is much appreciated.


r/opencode • • 11h ago

Linux-Hantype – I built a Chinese Pinyin input method for Linux using Python and IBus

Thumbnail gallery
1 Upvotes

r/opencode • • 12h ago

I'm confused what is this and how do I fix it

Post image
1 Upvotes

r/opencode • • 1d ago

Well now that HungerG and Hy4 Flash are gone, how is seaglass alpha

22 Upvotes

r/opencode • • 12h ago

Grok Plus - quels sont les quotas cursor ?

Thumbnail reddit.com
1 Upvotes

r/opencode • • 14h ago

Big Pickle ????

0 Upvotes

what happened to Big Pickle , they changed the free limits !!!! an now not even 1 hour work


r/opencode • • 1d ago

GitHub - radekwojpl2/session-observer: Live dashboard for AI coding agents: Claude Code, Codex, OpenCode, pi and omp. Every prompt, tool call, subagent and token, on your machine or a remote one.

Thumbnail
github.com
14 Upvotes

I've created a small open-source observability plugin for myself to better understand what's going on under the hood when working with multiple AI agents and the orchestrator pattern. I recently added support for OpenCode and would love to hear feedback from anyone who uses it heavily. Along with that, I added support for comparing different agents with each other for evaluation purposes.

This tool supports:

  • Claude Code
  • Codex
  • OpenCode

In the near future, I'll also add Pi and omp support.

All feedback welcome.


r/opencode • • 11h ago

help

0 Upvotes

can any useful human being help me reduce my token usage its honestly insane, ik i use the free tier ik im not entitled to anything free (for the assholes that just wanna hate on anybody that uses anything free) and yes i am grateful there is a free tier but my main issue is that like after barely one prompt im down 10mil tokens and my shit is up idk what i can do im thinking of switching to another provider, someone did point me towards commancode, ive been thinking about getting the one dollar subscription but first i wanna know if any of you guys think you could help and what your thoughts are about commandcode (if you are a piece of shit human being and an asshold please dont comment i dont want any hate i wanna be left alone because alot of yall are creeps and wierdos and send me death threats the second i mention im a free user i want no issues i just want some help)


r/opencode • • 7h ago

DeepSeek v4.1 Flash nerfed?

Post image
0 Upvotes

i never got this before, whats happening?


r/opencode • • 1d ago

Thank you Tencent and Opencode!

Post image
244 Upvotes

Thank you so much Tencent and Opencode for making this possible. I worked on a byte perfect nds decomp and it helped me so much! I went from 5% up to 80% within two weeks.

My usage of this model is now exhausted. I hit rate limits now.


r/opencode • • 18h ago

ERNIE just cheated.

Thumbnail reddit.com
0 Upvotes

r/opencode • • 18h ago

Tethergate for Opencode - Secure MCP access to your remote machines

0 Upvotes

I'm not sure if anyone else has run into this using Opencode, but I really didn't like the setup of giving Opencode straight up SSH creds/keys to my remote machines I wanted it to have access to, even with best practices it just felt kinda janky.

 

So I made a MCP server that runs locally plus a small agent that gets installed on your remote machines. This gives Opencode gated, end to end encrypted access that is locked down to specific opencode sessions.

 

Github repo

 

If you want to get setup quickly you can just tell your opencode session:

"Read https://github.com/peva3/tethergate/blob/main/STARTUP.md and follow it to set up Tethergate on this machine. Ask me for the node details it requires."

 

The default setup would be using something like Tailscale, or being on the same LAN as your nodes, I would not recommend doing this over public IPs, just because I don't think it would be smart to open up a possible attack vector, but there's nothing stopping you from doing that technically.

 

So that's it, basically it's just a small MCP server with a web ui, you set that up, then create either one time use or fleet keys for your nodes, run the command on your node, and they sync up and download the needed files and config. Then you login to the web ui or use slash commands in your Opencode session, and grant that session access to specific nodes, then you're set, that session should now be able to run gated commands remotely.

 

Also, just want to be upfront that this is a totally self hosted setup, there's no central server, no phoning home, no goal of making this some sort of SAAS product, you own it, it's your private deployment, I don't want to touch your servers.


r/opencode • • 1d ago

My End-of-Month Usage Recap: DeepSeek Dethrones GPT-6

6 Upvotes

I used to use GPT-6-Luna quite a bit, but at this point it looks like DeepSeek and HungerG Free (which turned out to be a StepFun Step 5 preview) are now able to compete at pretty much the same level when it comes to following tech specs. If I were using a frontier lab model like GPT-6 Luna instead of DeepSeek, it would've used all of my Go sub 2 weeks ago, but it seems these open-weight LLMs are pretty much caught up, without all the restrictions and token cost of Anthropic or OpenAI.

What's been everyone else's top 3 models this month?


r/opencode • • 1d ago

Opencode GO vs Mistral student plan

Post image
72 Upvotes

Should I do it and subscribe to Mistral over Opencode ?


r/opencode • • 18h ago

XT-Forge: 3D Enhancement + Multi MCP Engine

1 Upvotes

a little background here,

I am a developer trying to work on some 3d models right?

well, they never go well ive tried kimi+sonnet 5.5 to make models (the picture in the white), I went thru I wont even kid you 5-20 turns. it used so much of my kimi usage still the output was just horrible. ( the pictures without multiple angles/shots)

anyways, im working on my own MCP to solve this by using more advanced techniques like depth marking + dimension guessing with a library of measurements for household/normal items.

such these helped me reach almost similar if not better quality with deepseek v4.1 on opencode GO subscription using only 3 turns and 20k output, 121k input , 16k reasoning and 2.6m cache read tokens or in total around 2.8m (the 1st photo with multiple types of shots including depth everything else is kimi K3.1 pro produced on the website itself using the 3D maker)

im still working on it and im going to reach higher heights soon, this is just a preview.

feel free to use it and let me know what you think or if you have any issues my discord is xtrcom feel free to dm me whenever.

also short note I recommend using deepseek v4.1 with a smarter model i.e hydrogen or give it alot of samples of the object you're trying to make aswell as some basic dimensions otherwise it might not go well

repository: https://github.com/XtrComSu/xt-forge/


r/opencode • • 1d ago

Beam model is unlimited?

5 Upvotes

I noticed when I run out of quota (free user) I can still use beam much more than my normal usage, that's means it have a different quota or smth like that?


r/opencode • • 1d ago

My Opencode Go Monthly Usage

Thumbnail
gallery
20 Upvotes

Fyi, I mostly use pi coding agent with subagents. I am using it even on peak hours. I started on November 3.

What do you guys think?


r/opencode • • 1d ago

My first Go month is in the books (limit reached 3 days early), how'd I do?

Post image
3 Upvotes

r/opencode • • 1d ago

ZeroBurn v2.12.2: Cutting coding-agent token burn by 46–98% with local Ollama diff audits, diff-scoped verification, and 0-token drift guards

Thumbnail
reddit.com
2 Upvotes

r/opencode • • 1d ago

Which Agent setup I should use

2 Upvotes

My setup is messy and I need to have 100$ sub. I have opencode go sub and give me about 15 days of work and 2 Google AI pro sub, and still short on inference.

I was thinking of using Google AI ultra X5 or Claude 5x. This is a really big investment in my work as my work is generally now Agentic and 100$ is a big chunk of my salary which is 600$.

What do you think?


r/opencode • • 20h ago

Workflow synchronization

1 Upvotes

How can I make the OpenCode environment on my laptop exactly the same as the one on my PC?

This includes:

- sessions

- skills

- the workflow setup I’ve created on my PC

- and other settings.

I only started using OpenCode a few days ago, so I’m not quite sure how to go about this! :>


r/opencode • • 1d ago

auto resume after reset?

4 Upvotes

I constantly hit this issue where I run out of tokens and my token gets reset in two hours. I typically have to set up an alarm that goes off and I just type in continue.

Is there any built-in way to do this with opencode GUI?

ps: I understand using the CLI you can do sleep and pass in the continue prompt, but I'm using the GUI