Skip to content

Resolving Compatibility Issues with Other Plugins

Plugin compatibility is a common issue when using Antigravity Auth. Different plugins may conflict with each other, causing authentication failures, missing thinking blocks, or request format errors. This tutorial helps you resolve compatibility issues with plugins like oh-my-opencode and DCP.

What You'll Learn

  • Configure correct plugin load order to avoid DCP issues
  • Disable conflicting authentication methods in oh-my-opencode
  • Identify and remove unnecessary plugins
  • Enable PID offset for parallel agent scenarios

Common Compatibility Issues

Issue 1: Conflict with oh-my-opencode

Symptoms:

  • Authentication fails or OAuth authorization window pops up repeatedly
  • Model requests return 400 or 401 errors
  • Agent model configuration does not take effect

Cause: oh-my-opencode enables built-in Google authentication by default, which conflicts with Antigravity Auth's OAuth flow.

Core Issue

oh-my-opencode intercepts all Google model requests and uses its own authentication method. This causes Antigravity Auth's OAuth tokens to be unusable.

Solution:

Edit ~/.config/opencode/oh-my-opencode.json and add the following configuration:

json
{
  "google_auth": false,
  "agents": {
    "frontend-ui-ux-engineer": { "model": "google/antigravity-gemini-3-pro" },
    "document-writer": { "model": "google/antigravity-gemini-3-flash" },
    "multimodal-looker": { "model": "google/antigravity-gemini-3-flash" }
  }
}

Configuration Explanation:

ConfigurationValueDescription
google_authfalseDisable oh-my-opencode's built-in Google authentication
agents.<agent-name>.modelgoogle/antigravity-*Override Agent model to Antigravity model

Checkpoint ✅:

  • Restart OpenCode after saving the configuration
  • Test if Agent is using Antigravity model
  • Check if OAuth authorization window no longer pops up

Issue 2: Conflict with DCP (@tarquinen/opencode-dcp)

Symptoms:

  • Claude Thinking model returns error: thinking must be first block in message
  • Thinking blocks are missing from conversation history
  • Thinking content cannot be displayed

Cause: DCP creates synthetic assistant messages without thinking blocks, which conflicts with Claude API requirements.

What are synthetic messages?

Synthetic messages are messages automatically generated by plugins or the system to fix conversation history or complete missing messages. DCP creates these messages in certain scenarios but does not add thinking blocks.

Solution:

Ensure Antigravity Auth loads before DCP. Edit ~/.config/opencode/config.json:

json
{
  "plugin": [
    "opencode-antigravity-auth@latest",
    "@tarquinen/opencode-dcp@latest"
  ]
}

Why this order is needed:

  • Antigravity Auth processes and fixes thinking blocks
  • DCP creates synthetic messages (which may be missing thinking blocks)
  • If DCP loads first, Antigravity Auth cannot fix messages created by DCP

Checkpoint ✅:

  • Check that opencode-antigravity-auth is before @tarquinen/opencode-dcp
  • Restart OpenCode
  • Test if Thinking model displays thinking content normally

Issue 3: Account Allocation in Parallel Agent Scenarios

Symptoms:

  • Multiple parallel agents use the same account
  • All agents fail simultaneously when encountering rate limits
  • Low quota utilization

Cause: By default, multiple parallel agents share the same account selection logic, causing them to potentially use the same account simultaneously.

Parallel Agent Scenarios

When you use Cursor's parallel feature (such as running multiple Agents simultaneously), each Agent independently initiates model requests. Without proper account allocation, they may "collide."

Solution:

Edit ~/.config/opencode/antigravity.json and enable PID offset:

json
{
  "pid_offset_enabled": true
}

What is PID Offset?

PID (Process ID) offset allows each parallel agent to use a different account starting index:

Agent 1 (PID 100) → Account 0
Agent 2 (PID 101) → Account 1
Agent 3 (PID 102) → Account 2

This way, even when making requests simultaneously, they won't use the same account.

Prerequisites:

  • Need at least 2 Google accounts
  • Recommended to enable account_selection_strategy: "round-robin" or "hybrid"

Checkpoint ✅:

  • Confirm multiple accounts are configured (run opencode auth list)
  • Enable pid_offset_enabled: true
  • Test if parallel agents use different accounts (check debug logs)

Issue 4: Unnecessary Plugins

Symptoms:

  • Authentication conflicts or duplicate authentication
  • Plugin loading failures or warning messages
  • Confusing configuration, unsure which plugins are in effect

Cause: Installed plugins with overlapping functionality.

Redundant Plugin Check

Regularly check the plugin list in config.json and remove unnecessary plugins to avoid conflicts and performance issues.

Unnecessary Plugins:

Plugin TypeExampleReason
gemini-auth pluginsopencode-gemini-auth, @username/gemini-authAntigravity Auth already handles all Google OAuth
Claude authentication pluginsopencode-claude-authAntigravity Auth does not use Claude authentication

Solution:

Remove these plugins from ~/.config/opencode/config.json:

json
{
  "plugin": [
    "opencode-antigravity-auth@latest"
    // Remove these:
    // "opencode-gemini-auth@latest",
    // "@username/gemini-auth@latest"
  ]
}

Checkpoint ✅:

  • View plugin list in ~/.config/opencode/config.json
  • Remove all gemini-auth related plugins
  • Restart OpenCode and confirm no authentication conflicts

Troubleshooting Common Errors

Error 1: thinking must be first block in message

Possible Causes:

  • DCP loads before Antigravity Auth
  • oh-my-opencode's session recovery conflicts with Antigravity Auth

Troubleshooting Steps:

  1. Check plugin load order:

    bash
    grep -A 10 '"plugin"' ~/.config/opencode/config.json
  2. Ensure Antigravity Auth is before DCP

  3. If the problem persists, try disabling oh-my-opencode's session recovery (if it exists)

Error 2: invalid_grant or authentication failure

Possible Causes:

  • oh-my-opencode's google_auth is not disabled
  • Multiple authentication plugins are trying to process requests simultaneously

Troubleshooting Steps:

  1. Check oh-my-opencode configuration:

    bash
    cat ~/.config/opencode/oh-my-opencode.json | grep google_auth
  2. Ensure the value is false

  3. Remove other gemini-auth plugins

Error 3: All parallel agents use the same account

Possible Causes:

  • pid_offset_enabled is not enabled
  • Number of accounts is less than number of agents

Troubleshooting Steps:

  1. Check Antigravity configuration:

    bash
    cat ~/.config/opencode/antigravity.json | grep pid_offset
  2. Ensure the value is true

  3. Check account count:

    bash
    opencode auth list
  4. If accounts are fewer than agents, consider adding more accounts


Configuration Examples

Complete Configuration Example (including oh-my-opencode)

json
// ~/.config/opencode/config.json
{
  "plugin": [
    "opencode-antigravity-auth@latest",
    "@tarquinen/opencode-dcp@latest",
    "oh-my-opencode@latest"
  ]
}
json
// ~/.config/opencode/antigravity.json
{
  "pid_offset_enabled": true,
  "account_selection_strategy": "hybrid"
}
json
// ~/.config/opencode/oh-my-opencode.json
{
  "google_auth": false,
  "agents": {
    "frontend-ui-ux-engineer": { "model": "google/antigravity-gemini-3-pro" },
    "document-writer": { "model": "google/antigravity-gemini-3-flash" },
    "multimodal-looker": { "model": "google/antigravity-gemini-3-flash" }
  }
}

Lesson Summary

Plugin compatibility issues usually stem from authentication conflicts, plugin load order, or overlapping functionality. By configuring correctly:

  • ✅ Disable oh-my-opencode's built-in Google authentication (google_auth: false)
  • ✅ Ensure Antigravity Auth loads before DCP
  • ✅ Enable PID offset for parallel agents (pid_offset_enabled: true)
  • ✅ Remove redundant gemini-auth plugins

These configurations can avoid most compatibility issues and keep your OpenCode environment running smoothly.

Next Lesson Preview

In the next lesson, we'll learn Migration Guide.

You'll learn:

  • Migrate account configurations between different machines
  • Handle configuration changes during version upgrades
  • Backup and restore account data

Appendix: Source Code Reference

Click to expand source code locations

Last updated: 2026-01-23

FeatureFile PathLines
Thinking blocks processingsrc/plugin/request-helpers.ts898-930
Thinking block signature cachesrc/plugin/cache/signature-cache.tsentire file
PID offset configurationsrc/plugin/config/schema.ts69-72
Session recovery (based on oh-my-opencode)src/plugin/recovery/index.tsentire file

Key Configurations:

  • pid_offset_enabled: true: Enable process ID offset to allocate different accounts for parallel agents
  • account_selection_strategy: "hybrid": Intelligent hybrid account selection strategy

Key Functions:

  • deepFilterThinkingBlocks(): Remove all thinking blocks (request-helpers.ts:898)
  • filterThinkingBlocksWithSignatureCache(): Filter thinking blocks based on signature cache (request-helpers.ts:1183)