Configuration

8 min read

Fixing 'Lazy' GPT Agents in OpenClaw

Three proven changes that transform GPT-5.4 from mediocre to exceptional. Stop hand-holding your agents and let them actually finish the work.

The Problem

After Anthropic banned OpenClaw from using Claude subscriptions, many migrated to GPT-5.4. The experience? Mediocre at best. Agents would spawn subagents but never finish work. Browser operations failed silently. You had to constantly check in, ping-pong messages, and hold their hand through every task.

The Three Fixes That Actually Work

These are not theoretical recommendations. They are battle-tested configurations that transformed agent behavior from "wall of text" generators to operators that close loops and finish tasks.

1. Enable Strict Agent Contract

The strict contract forces agents to follow explicit operational rules instead of improvising. This eliminates the vague, hand-wavy responses and replaces them with concrete, auditable workflows.

{
  "agents": {
    "defaults": {
      "strict": true
    }
  }
}

2. Activate the Codex Plugin

The Codex plugin enables proper tool routing and recovery mechanisms. Without it, GPT-5.4 lacks the infrastructure to spawn subagents correctly, manage browser sessions, or recover from mid-task failures.

{
  "plugins": {
    "entries": {
      "openai-codex": {
        "enabled": true
      }
    }
  }
}

3. Set GPT-5.4 as Default Model

Remove ambiguity. Explicitly set GPT-5.4 as your primary model with proper fallback chaining. Clean up any leftover Anthropic configuration lines that might confuse routing.

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "openai-codex/gpt-5.4",
        "fallbacks": [
          "openai-codex/gpt-5.4-mini",
          "zai/glm-5"
        ]
      }
    }
  }
}

What Changes After Implementation

  • Cleaner routing and recovery: Agents stop freezing mid-task
  • Reliable browser operations: Browser sessions spin up correctly
  • Less text, more action: Fewer walls of explanation, more completed work
  • Loop closure: Agents actually finish what they start
  • Respectable operator flow: Concrete workflows instead of vague recommendations

The Enhanced Master Prompt

Feed this prompt to your agent after implementing the three fixes above. It establishes operational discipline and ensures consistent execution quality.

OPERATIONAL CONTRACT — GPT-5.4 Agent Configuration

GOAL:
Transform agent behavior from conversational to operational. Execute tasks completely 
without hand-holding. Close every loop.

CORE DIRECTIVES:

1. EXECUTE, DON'T DISCUSS
   - When given a task, do it. Do not ask for permission at every step.
   - If clarification is genuinely needed, ask ONE specific question, then proceed.
   - Default to action. Explain only when explicitly requested.

2. COMPLETE THE WORK
   - Spawn subagents when tasks exceed 2 minutes or require isolation.
   - Track spawned work. Verify completion before reporting done.
   - If a subagent fails, retry once with adjusted parameters, then escalate.

3. BROWSER AUTONOMY
   - Start browser sessions without asking when web access is needed.
   - Handle logins via stored credentials or ask for them once, then store.
   - Take screenshots for verification when operations are critical.

4. TOOL CONFIDENCE
   - Use available tools without hesitation.
   - Chain multiple tools in sequence when the task requires it.
   - If a tool fails, try alternatives before giving up.

5. OUTPUT DISCIPLINE
   - Lead with results. Context comes after the answer.
   - Use formatting for readability, not decoration.
   - When done, explicitly state: "Task complete. [Summary of what was done]."

CONSTRAINTS:

- Never invent facts. If uncertain, state uncertainty clearly.
- Never execute destructive operations without explicit confirmation.
- Respect rate limits. If throttled, wait and retry rather than failing.
- Keep responses tight. One screen of text max unless detail is requested.

RECOVERY PROTOCOL:

If you get stuck:
1. Try the obvious fix once
2. If that fails, try one alternative approach
3. If still stuck, report: "Blocked: [specific issue]. Tried: [what you tried]. Need: [specific help]."

VERIFICATION CHECKPOINT:

Before marking any task complete:
- [ ] All subagents finished successfully
- [ ] Outputs saved to expected locations
- [ ] Results verified against original request
- [ ] User notified with concise summary

OUTPUT FORMAT:

For every response:
1. Status: [In Progress / Blocked / Complete]
2. Action taken: [What you just did]
3. Next step: [What happens next or "None — task complete"]

ACKNOWLEDGE:
Reply with: "Contract acknowledged. Operating in execution mode."

Implementation Workflow

  1. Backup your config: Copy your openclaw.json before any changes. Store it in version control or cloud storage.
  2. Update to 4.14: Run openclaw update or prompt your agent to update.
  3. Apply the three fixes: Add the strict contract, enable Codex plugin, set GPT-5.4 as default.
  4. Feed the master prompt: Paste the operational contract above to your agent.
  5. Verify: Give a test task that requires subagents and browser work. Confirm it completes without hand-holding.

What to Avoid

  • The embedded harness: It can brick your setup. Skip it.
  • Legacy Anthropic config lines: Remove OAuth/subscription entries. Keep only API tokens if used.
  • Over-explaining: If your agent writes 3 paragraphs before acting, the contract needs reinforcement.

Real Results

After implementing these fixes, agent behavior changes dramatically. Tasks that previously required constant check-ins now complete autonomously. Browser automation works reliably. Subagents spawn, execute, and report back without getting lost.

The difference is not incremental. It is night and day. Agents go from conversational partners that need management to operators that deliver results.

FAQ

Will these fixes work with other models?

The strict contract and operational discipline help with any model, but the Codex plugin and GPT-5.4 specific configurations are designed for OpenAI's ecosystem. For Claude or other models, different optimizations apply.

Do I need to restart OpenClaw after applying these changes?

Yes. After modifying openclaw.json, restart the OpenClaw service for changes to take effect. Run 'openclaw restart' or restart your Docker container.

What if the embedded harness causes issues?

Skip it. The embedded harness can brick setups. The three fixes listed here (strict mode, Codex plugin, default model) provide the core improvements without the harness instability.

How do I verify the fixes are working?

Give your agent a test task that requires spawning subagents and browser automation. A working setup will complete the task without constant check-ins and hand-holding.

Need help from people who already use this stuff?

Need help from people who already use this?

Connect with other OpenClaw users, share your GPT-5.4 experiences, and learn from the community.