When the model refusesin opencode
opencode stops in the middle of a task and the last message is the model explaining that it cannot help. Nothing crashed. The model declined a step, and an agent loop has no way to carry on after that. This is how to recognise it and how to get the session moving again.
How to recognise a refusal
- The turn ends with prose and no tool call: no file read, no edit, no command.
- The prose talks about safety, policy, ethics or what the model is "not able to assist with", rather than about your code.
- Asking again with a longer explanation sometimes works for one step and then fails on the next.
- The same task on a different model goes straight through.
A real failure looks different. A provider error shows an HTTP status. A tool error shows the command and its output. A context problem shows a compaction or a length error. None of those come with an apology.
Why it ends the loop
An agent harness keeps going for as long as the model answers with a tool call. A refusal is an ordinary assistant message, so opencode does the correct thing and hands control back to you. The trouble is where that leaves the work: three files edited out of seven, a migration half applied, a test suite that now fails because the change stopped partway.
What sets it off
Almost always a word or a pattern, not the actual risk of the task. Developers hit it on things like these:
- Security work on your own systems: scanners, fuzzers, exploit proofs for a bug you are patching, reading a malware sample.
- Scrapers and automation that touch logins, rate limits or captchas.
- Reverse engineering a binary or a protocol you need to interoperate with.
- Code that handles credentials, tokens or personal data, even in a test fixture.
- Fiction, game dialogue or test data with violent or adult content.
The fix: change the model, keep the session
- Add this provider to opencode once, with the block on the opencode page.
- When a model refuses, type
/modelsand pick an abliterated or uncensored model from Uncensored Opencode. The conversation so far stays where it is. - Tell it to continue from the step that was refused. It has the same history, so it picks up the plan the first model wrote.
You do not have to move all your work. Plenty of people keep their usual model as the default and switch only when it stops. If refusals are a regular part of your day, make an abliterated model the default instead:
"model": "uncensored-opencode/kimi-k3.1-pro-uncensored"What does not work well
- Jailbreak prompts. They are fragile, they fail again a few steps later, and the extra text pulls the model away from the code.
- Rewording every request to sound harmless. It costs you a turn each time and the next tool result can set the model off again.
- Splitting the task so small the model cannot see what it is for. The quality of the plan drops with it.
Which model to switch to
| Model | Build | Context | Tools | Images | Per million tokens |
|---|---|---|---|---|---|
GLM 5.3 Flashglm-5.3-flash-uncensored | Uncensored | 1M tokens | Yes | Yes | $0.30 in / $1.00 out |
Kimi K3.1 Prokimi-k3.1-pro-uncensored | Abliterated | 1M tokens | Yes | Yes | $7.50 in / $37.50 out |
GLM 5.3glm-5.3-uncensored | Uncensored | 1M tokens | Yes | No | $2.00 in / $5.00 out |
DeepSeek V4.1 Flash 1017deepseek-v4.1-flash-1017-uncensored | Abliterated | 1M tokens | Yes | Yes | $1.25 in / $2.50 out |
MiMo V2.6 Flashmimo-v2.6-flash-uncensored | Abliterated | 1M tokens | Yes | Yes | $1.00 in / $2.00 out |
Qwen3.8 27Bqwen3.8-27b-uncensored | Uncensored | 1M tokens | Yes | Yes | $1.50 in / $5.00 out |
GLM 5.3 Flash Cyberglm-5.3-flash-cyber | Security-tuned | 1M tokens | Yes | Yes | On the models page |
Questions
Will an abliterated model do anything at all?
It will not refuse a step on principle. It is still a model: it can be wrong, and you are still responsible for what you build and run with it.
Does switching model lose my context?
No. /models changes which model answers next. The session history, including the plan and the tool results, is sent to the new model.
Is it my prompt?
Usually not. Refusals in agent sessions are triggered by the content of files and tool results as often as by anything you typed.