Skip to content

Conversation

@KonaEspresso94
Copy link

@KonaEspresso94 KonaEspresso94 commented Jan 30, 2026

Summary

  • Fix agents.*.tools configuration being ignored in oh-my-opencode.json
  • Add migrateAgentConfig() call in mergeAgentConfig() to convert toolspermission
  • Add unit tests to verify tools migration works for agent overrides

Changes

  • src/agents/utils.ts:

    • Import migrateAgentConfig from shared
    • Call migrateAgentConfig() on override before merging in mergeAgentConfig()
  • src/agents/utils.test.ts:

    • Add test: tools: { x: false } is migrated to permission: { x: "deny" }
    • Add test: tools: { x: true } is migrated to permission: { x: "allow" }
    • Add test: tools config is removed after migration

Testing

Unit tests

bun run typecheck
bun test src/agents/utils.test.ts
bun test src/shared/permission-compat.test.ts

Manual Verification

# Test migration works
bun -e "
const { createBuiltinAgents } = require('./src/agents/utils');

async function test() {
  const agents = await createBuiltinAgents([], { 
    explore: { 
      tools: { 
        'jetbrains_get_*': true, 
        'jetbrains_create_*': false 
      } 
    } 
  }, undefined, 'anthropic/claude-opus-4-5');
  
  console.log('permission:', agents.explore.permission);
  console.log('tools:', agents.explore.tools);
}

test();
"

# Expected output:
# permission: { ..., "jetbrains_get_*": "allow", "jetbrains_create_*": "deny" }
# tools: undefined

Verified In Real OpenCode Environment

Pointed OpenCode to the locally built plugin output via file:// (instead of the npm-installed plugin), then confirmed the issue described in #1288 is resolved.

screenshots (Sensitive information masked.)
before :
image

after :
image

Related Issues

Fix #1288


Summary by cubic

Fix ignored agents.*.tools overrides by migrating tools → permission during config merge. Tools allow/deny flags in oh-my-opencode.json now take effect (fixes #1288).

Written for commit 8a5b131. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@KonaEspresso94 KonaEspresso94 changed the title fix(agents): honor tools overrides via permission migration fix: honor tools overrides via permission migration Jan 30, 2026
@KonaEspresso94
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 30, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: agents.*.tools configuration in oh-my-opencode.json is ignored

1 participant