Keep the OpenCode agent in check: permissions and Budget Guard

Sidecar never approves anything for you. OpenCode's permission requests wait in place of the message box until you answer, and Budget Guard stops a task that runs past the cost or steps you allow.

Updated

Answer a permission request

When OpenCode asks before it runs a command or changes a file, the request takes the place of the message box. It shows what the agent wants to do and, when a subagent asks, which one.

Hover to answer: the choice moves to Yes, always allow.
  1. 011 Yes allows it this once.
  2. 022 Yes, always allow, when OpenCode offers it, makes OpenCode save a rule for the folder so it doesn't ask again.
  3. 033 No refuses. Type in the box instead to refuse and tell the agent what to do.
  4. 04Press 1, 2 or 3 to answer, or Esc for No.

Sensitive paths get a warning. Requests raised inside a subagent come back to you in the chat, a count on Sidecar's icon shows answers that are waiting even with the panel hidden, and a notification says what the agent is asking.

Review always-allowed rules

Type / in the message box and choose Always-allowed actions…. It lists the rules OpenCode saved for the folder. Remove any rule and OpenCode asks again next time.

Set a Budget Guard limit

Budget Guard is a local limit on cost and steps for each task. Set it with the slider in the model menu; ←/→ changes the level. The defaults:

  • Small: $0.10 or 20 steps
  • Medium: $0.30 or 50 steps
  • Large: $1.00 or 120 steps
  • Custom: $0.50 or 80 steps
Hover to run past the limit.
  1. 01At 80% of a limit, Sidecar warns you on the timeline.
  2. 02At the limit, Budget Guard stops the agent through OpenCode's own cancellation.
  3. 03You choose: Continue once, Increase budget or Start new session.

If OpenCode reports no cost for a model, only steps count. Click the context ring in the message box to see the session's context, cost, steps and task budget.

Stop the agent yourself

Press Esc in the message box or run Sidecar: Stop to stop the running task. Each subagent has its own Stop, so you can end one and let the rest carry on.