#Hit my weekly Oauth limit

1 messages · Page 1 of 1 (latest)

proven bronze
#

Looking to optimize my openclaw system. Need a cheap model to run basic loops and heartbeats so I'm not chewing through my tokens on my oauth. Also need something to get me through the next 4 days until my limit resets

ruby jacinthBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

runic marlinBOT
sour badgerBOT
#

Exec approval is required, but native chat exec approvals are not configured on Discord.

Approve it from the Web UI or terminal UI for now. Discord supports native exec approvals for this account. Configure channels.discord.execApprovals.approvers or commands.ownerAllowFrom; leave channels.discord.execApprovals.enabled unset/auto or set it to true.

#

Let me verify the local docs paths so I don't make up config advice.

#

I found the models docs, still looking up the FAQ path so I can answer from the actual docs instead of vibes.

sour badgerBOT
#
    },
  },
}

What matters most:

  • agents.defaults.heartbeat.model lets heartbeat use a different model
  • isolatedSession: true is a huge token saver, it avoids replaying full chat history
  • lightContext: true trims bootstrap context too
  • For scheduled loops, use isolated cron jobs with their own --model so they never hit your OAuth model

For the next 4 days, I’d do this:

  1. move heartbeat to a cheap model
  2. slow heartbeat to 1h or 2h
proven bronze
#

Can I setup ollama free cloud model to get things going as none of my agents can respond

sour badgerBOT
#

I’m checking the docs path for Ollama support so I don’t send you down a dead end.

#

Yes, as a temporary bridge, that can work.

OpenClaw supports Ollama Cloud and Cloud-only mode, so the easiest path is:

openclaw onboard

Then pick Ollama → Cloud only.

A couple important caveats:

  • Do not use an Ollama .../v1 OpenAI-compatible URL for this, tool calling gets weird there
  • Use the native Ollama provider/API instead
  • I’d use it for heartbeats + basic loops, not as your long-term main agent model if you rely on heavy tool use

For cheap heartbeat-only fallback, this is the kind of config I’d use:

#
{
  agents: {
    defaults: {
      heartbeat: {
        every: "1h",
        model: "ollama/<your-cloud-model>",
        isolatedSession: true,
        lightContext: true,
      },
    },
  },
}

If you want to make it your temporary default for the next 4 days, you can also switch the session/model after onboarding.

proven bronze
#

It says I hit my chat gpt usage limit plus plan. Try again in 5738 min

sour badgerBOT
#

Yep, that’s an upstream OpenAI/ChatGPT OAuth quota wall, not really an OpenClaw bug.

So until that resets, anything still pinned to that OAuth-backed model will stay blocked.

What to do now:

  1. Switch the live session/thread off that model

    • use /model
    • pick any non-OpenAI OAuth model you already have configured
  2. Move heartbeat/loops to a cheap non-OAuth model

    {
      agents: {
        defaults: {
          heartbeat: {
    
#
           model: "your-cheap-provider/model",
           isolatedSession: true,
           lightContext: true,
           every: "1h",
         },
       },
     },
   }
  1. If you want the whole system unstuck now

    • temporarily change agents.defaults.model.primary to a non-OAuth provider
    • or onboard Ollama Cloud / another provider and switch to that
  2. Check what’s actually available

sour badgerBOT
#

Quick note, the earlier local doc-path lookup I tried was blocked, so I verified against the live docs instead.

Nothing changes in the advice above: this still looks like an upstream OpenAI/ChatGPT quota exhaustion issue, so the fix is to switch your active sessions and heartbeats to a non-OAuth model until the reset.

If you paste openclaw models status, I can help you pick the fastest fallback from what you already have configured.

proven bronze
#

I got ollama minimax-m2.7 cloud to run. installed and switched to llama 3.2:3b to run heartbeats

sour badgerBOT
#

Nice, that should get you unstuck for now 👍

That’s a pretty sensible survival-mode setup for the next few days.

Two tweaks I’d still recommend for heartbeat token savings:

{
  agents: {
    defaults: {
      heartbeat: {
        isolatedSession: true,
        lightContext: true,
        every: "1h",
      },
    },
#
  },
}

Also, keep HEARTBEAT.md tiny and specific. Small models do a lot better when the loop is narrow.

If the 3b heartbeat model starts missing tools or acting flaky, that usually means it’s just a bit too small, then either simplify the heartbeat prompt more or bump heartbeat up one tier.

Glad you got it moving 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it.

proven bronze
#

I got an api key from openrouter as well. Can you tell me how to set it up with my agents using minimax m2.7 as my backup.

sour badgerBOT
#

I’m pulling the exact OpenRouter docs so I can give you the right config shape.

#

Yep. Easiest setup is:

openclaw onboard --auth-choice openrouter-api-key

Then set your main model to an OpenRouter route, and put your MiniMax route in fallbacks.

CLI way

openclaw models set openrouter/<provider>/<model>
openclaw models fallbacks add ollama/<your-minimax-m2.7-cloud>
openclaw models status

Config way

#
{
  env: {
    OPENROUTER_API_KEY: "sk-or-...",
  },
  agents: {
    defaults: {
      model: {
        primary: "openrouter/<provider>/<model>",
        fallbacks: ["ollama/<your-minimax-m2.7-cloud>"],
      },
      heartbeat: {
        model: "ollama/<your-heartbeat-model>", // keep your cheap heartbeat model here
        isolatedSession: true,
        lightContext: true,
      },
#

If you want, paste your current agents.defaults block and I’ll rewrite it into the exact JSON5 for your setup.

proven bronze
#

I have openrouter at as my backup model, but it's not working. Getting an " agent couldn't generate a response, please try again"

sour badgerBOT
#

That message is annoyingly generic, so we need the real failure underneath.

First, please paste these:

openclaw --version
openclaw models status --probe

And if you can, also paste your current:

agents.defaults.model

OpenRouter fallback usually breaks for one of these reasons:

proven bronze
#

did a security audi to fix some holes and it diables my agents. got this message. ⚠️ Agent failed before reply: Sandbox mode requires Docker, but the "docker" command was not found in PATH. Install Docker (and ensure "docker" is available), or set agents.defaults.sandbox.mode=off to disable sandboxing. | spawn docker ENOENT.
Logs: openclaw logs --follow

sour badgerBOT
#

Let me verify the sandbox config key in the docs so I don’t misname it.

#

First, what does openclaw --version show?

That said, this error is pretty direct: you enabled sandboxing, and your current sandbox backend is Docker, but Docker is not installed or not in PATH.

Two ways out:

Fastest way to get your agents back

Set sandboxing off:

{
  agents: {
    defaults: {
      sandbox: {
        mode: "off",
      },
#
    },
  },
}

Then restart the gateway:

openclaw gateway restart

If you actually want sandboxing

You need either:

  • Docker installed and available as docker, or
  • a different sandbox backend like ssh / openshell
#

One important gotcha from the docs: if you set sandbox.mode: "non-main", group/channel sessions still count as non-main, so Discord threads will be sandboxed too. That matches what you’re seeing.

So if you don’t have Docker yet, non-main will still break Discord agents.

Docs:

If you want, paste your current agents.defaults.sandbox block and I’ll tell you the smallest safe change.

proven bronze
#

how do I find the agents.defaults.sandbox block?

sour badgerBOT
#

It’s in your main config file:

~/.openclaw/openclaw.json

That file is JSON5, so comments/trailing commas are okay.

Look for:

{
  agents: {
    defaults: {
      sandbox: {
        mode: "off",
#
      },
    },
  },
}

If you don’t already have an agents.defaults.sandbox block, that’s totally fine, just add it under agents.defaults.

After saving, restart:

openclaw gateway restart

If you want, paste your current ~/.openclaw/openclaw.json agents section here and I’ll point to the exact spot.

proven bronze
#

{
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"openrouter/openai/gpt-4.1-mini",
"ollama/llama3.2:3b"
]
},

sour badgerBOT
#

Yep, add sandbox right next to model under agents.defaults, like this:

{
  agents: {
    defaults: {
      model: {
        primary: "openai-codex/gpt-5.4",
        fallbacks: [
          "openrouter/openai/gpt-4.1-mini",
          "ollama/llama3.2:3b",
        ],
      },
      sandbox: {
        mode: "off",
      },
#
    },
  },
}

Then restart the gateway:

openclaw gateway restart

That should stop the Docker sandbox error and get your agents replying again.

If this fixes it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it.

proven bronze
#

{
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"openrouter/openai/gpt-4.1-mini",
"ollama/llama3.2:3b"
]
},
sandbox: {
Mode: "off",
},
},
},
}

#

says there is an error

sour badgerBOT
#

Almost there, two small fixes:

  1. mode must be lowercase, not Mode
  2. you need a comma after the model block

Use this exact version:

{
  agents: {
    defaults: {
      model: {
        primary: "openai-codex/gpt-5.4",
        fallbacks: [
          "openrouter/openai/gpt-4.1-mini",
          "ollama/llama3.2:3b",
#
        ],
      },
      sandbox: {
        mode: "off",
      },
    },
  },
}

Then run:

openclaw gateway restart
proven bronze
#
  • <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '"' at 17:7
sour badgerBOT
#

If you want, paste the next error if it still complains, we’re very close.

#

Can you paste the exact error text? Even a tiny wording difference matters here.

Also please paste:

openclaw --version

If the error mentions a line number, paste that part of the config too.

The block I sent is valid JSON5, so if it’s still failing, it’s probably:

  • a typo elsewhere in the file
  • mismatched braces/commas above this section
  • or the block was pasted into the wrong spot

Paste the exact error and I’ll fix it with you.

#

Yep, that usually means the parser hit a " where it wasn’t expecting one, most often because a whole top-level block got pasted into the middle of the file.

Since you already have agents.defaults, don’t paste another full root object.

Just make this part look like this:

agents: {
  defaults: {
    model: {
      primary: "openai-codex/gpt-5.4",
      fallbacks: [
        "openrouter/openai/gpt-4.1-mini",
        "ollama/llama3.2:3b",
      ],
    },
#
    sandbox: {
      mode: "off",
    },
  },
}

The important part is just this sibling under defaults:

sandbox: {
  mode: "off",
},

So, do not add another extra top-level:

#
{
  "agents": {

if your file already has one.

If it still errors, paste lines around line 17 and I’ll point at the exact bad character.

proven bronze
#

Config invalid
File: ~/.openclaw/openclaw.json
Problem:

  • <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '"' at 17:7

Run: openclaw doctor --fix
openclaw@OpenClaws-Virtual-Machine ~ % openclaw --version
OpenClaw 2026.4.15 (041266a)
openclaw@OpenClaws-Virtual-Machine ~ %

sour badgerBOT
#

Thanks, version looks fine. This is just a syntax issue in ~/.openclaw/openclaw.json, not a bad OpenClaw build.

At this point I need to see the actual lines around the failure. Please paste lines 10-22 from the file.

If you want line numbers, run:

nl -ba ~/.openclaw/openclaw.json | sed -n '10,22p'

That command is read-only, it just shows the broken section.

Tiny gotcha: when JSON5 says invalid character '"' at 17:7, the real mistake is often 1-2 lines above it, like:

  • missing comma
  • extra {
  • duplicated "agents" / "defaults" block
#
  • pasting a full root object inside an existing one

Paste that snippet and I’ll point at the exact fix.

proven bronze
#

{
agents: {
defaults: {
model: {
primary: "openai-codex/gpt-5.4",
fallbacks: [
"openrouter/openai/gpt-4.1-mini",
"ollama/llama3.2:3b",
],
},
sandbox: {
mode: "off",
},
},
},
}
"models": {
"openai-codex/gpt-5.4": {},
"openrouter/auto": {
"alias": "OpenRouter"

sour badgerBOT
#

Ah, found it.

You pasted a whole new root object into the middle of the existing file. That’s why JSON5 blows up.

The bad part is this:

{
  agents: {
    defaults: {
      ...
    },
  },
}
      "models": {
#

After that closing }, the file keeps going, so the parser hits "models" and says “what the hell is this quote doing here?”

What to do

Remove that extra top-level wrapper and make it one continuous defaults block, like this:

agents: {
  defaults: {
    model: {
      primary: "openai-codex/gpt-5.4",
      fallbacks: [
        "openrouter/openai/gpt-4.1-mini",
        "ollama/llama3.2:3b",
      ],
    },
#
    sandbox: {
      mode: "off",
    },
    models: {
      "openai-codex/gpt-5.4": {},
      "openrouter/auto": {
        alias: "OpenRouter",
      },
      // keep the rest of your existing models here
    },
  },
},

So the key fix is:

#
  • delete the extra opening/closing full-file braces you pasted
  • put sandbox inside the existing agents.defaults block
  • keep "models" immediately after it

If you want the shortest possible fix, just add this right before your existing "models": { ... } section:

sandbox: {
  mode: "off",
},

and do not paste another full { agents: { defaults: ... } }.

Then save and run:

#
openclaw gateway restart

You’re very close. If you want, paste the next 15 lines after sandbox: and I’ll sanity-check the whole block.

proven bronze
#

{
agents: {
defaults: {
model: {
primary: "openai-codex/gpt-5.4",
fallbacks: [
"openrouter/openai/gpt-4.1-mini",
"ollama/llama3.2:3b",
],
},
sandbox: {
mode: "off",
},
},
},
}
"models": {
"openai-codex/gpt-5.4": {},
"openrouter/auto": {
"alias": "OpenRouter"
},
"ollama/llama3.2:3b": {
"alias": "Local Ollama"
},
"openrouter/minimax/minimax-m2.7": {
"alias": "OpenRouter MiniMax M2.7"
},
"openrouter/openai/gpt-4.1-mini": {
"alias": "OpenRouter GPT-4.1 Mini"
}
},
"workspace": "/Users/openclaw/.openclaw/workspace",
"sandbox": {
"mode": "all"
}
},

sour badgerBOT
#

Yep, now it’s clear.

You already had a sandbox block in the real config here:

      "sandbox": {
        "mode": "all"
      }

So the fix is actually much simpler:

1. Delete the whole block you pasted at the top

Delete this entire inserted chunk:

#
{
  agents: {
    defaults: {
      model: {
        primary: "openai-codex/gpt-5.4",
        fallbacks: [
          "openrouter/openai/gpt-4.1-mini",
          "ollama/llama3.2:3b",
        ],
      },
      sandbox: {
        mode: "off",
      },
    },
  },
#
}

2. Change the existing sandbox block

Change this:

      "sandbox": {
        "mode": "all"
      }

to this:

#
      "sandbox": {
        "mode": "off"
      }

That’s it.

So basically:

  • remove the duplicate block you added
  • edit the existing "sandbox" from "all" → "off"

Then restart:

openclaw gateway restart
#

I’m pretty confident that’ll fix it. If you want, paste the file again after that change and I’ll do one last sanity check.

proven bronze
#

ok its fixed, thank you