Skip to content

fix: respect disabled_tools config in agent prompts (fixes #2742)#2767

Merged
code-yeongyu merged 1 commit intodevfrom
fix/issue-2742
Mar 23, 2026
Merged

fix: respect disabled_tools config in agent prompts (fixes #2742)#2767
code-yeongyu merged 1 commit intodevfrom
fix/issue-2742

Conversation

@code-yeongyu
Copy link
Copy Markdown
Owner

@code-yeongyu code-yeongyu commented Mar 23, 2026

Problem

The question tool (and other tools) cannot be disabled via disabled_tools config because agent markdown prompts hardcode tool references regardless of user configuration.

Fix

Check disabled_tools list when building agent system prompts. If a tool is in the disabled list, remove its references from the agent prompt.

Fixes #2742

Automated fix by Sisyphus (oh-my-opencode)


Summary by cubic

Respect disabled_tools in agent prompts and permissions. When question is disabled, its prompt references are removed and the tool is denied for all agents. Fixes #2742.

  • Bug Fixes
    • Strip Question({...}) examples from Prometheus system prompts when question is disabled.
    • Pass disabled_tools through the Prometheus agent config builder and use it in tool-config-handler to set question to "deny".
    • Add tests for prompt stripping and permission handling across agents.

Written for commit f5eaa64. Summary will update on new commits.

- Check disabled_tools for 'question' in tool-config-handler permission logic
- Strip Question tool code examples from Prometheus prompts when disabled
- Pass disabled_tools through prometheus agent config builder pipeline
- Add tests for disabled_tools question permission handling
Copy link
Copy Markdown

@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 6 files

Confidence score: 5/5

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

Auto-approved: Correctly implements tool stripping and permission denial for disabled tools with comprehensive tests, ensuring no regressions for existing configurations.

@code-yeongyu code-yeongyu merged commit d5d7c7d into dev Mar 23, 2026
8 checks passed
@code-yeongyu code-yeongyu deleted the fix/issue-2742 branch March 23, 2026 09:39
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]: Question tool cannot be disabled

1 participant