Comment by moretti

4 days ago

Does opencode support anything similar to claude code's auto mode (https://code.claude.com/docs/en/permission-modes#eliminate-p...)?

I'd like to switch to opencode, But "yolo mode" feels risky and manually approving every command the model runs kills the flow

Put the agent in a sandbox.

  • This is the only way. Auto mode is really just yolo mode with more LLM tokens billed. It may catch some weird shit but it isn't a reliable sandbox. Just lock up the LLM and let it run.

    • It's the only way if you want 100% security but often a compromise between security and usability is preferred.

      I'm actually working on multi harness auto mode. It's already done for Pi and I'm currently working on copilot cli port (where it is needed the most by the fa r of autopilot in copilot being so atrocious).

      The correct way for auto approve to work is similar to what claude code does (a deterministic algorithm where a separate model reads what the user says and adds rules based on what the user enables).

      I couldn't believe such a thing that works well doesn't exist, but it doesn't. You either have to do borderline yolo or you cannot leave a model working overnight and not find it got stuck on some silyness after an hour.

  • What sandboxing tools do you recommend? There's lots out there and I'm unsure which to trust.

FWIW OC 2.0 remembers perms for a project/directory pretty solidly now, so flow-killing approvals are more a one-time thing for a given project. It's sad they can't be globally set though, so a new project pays the approval-by-tool tax.