Skip to content

[codex] fix OpenCode agent tools frontmatter schema#75

Draft
Dawn-Fighter wants to merge 1 commit into
shuvonsec:mainfrom
Dawn-Fighter:fix/opencode-agent-tools-schema
Draft

[codex] fix OpenCode agent tools frontmatter schema#75
Dawn-Fighter wants to merge 1 commit into
shuvonsec:mainfrom
Dawn-Fighter:fix/opencode-agent-tools-schema

Conversation

@Dawn-Fighter

Copy link
Copy Markdown

Summary

  • Replace comma-separated tools strings in all agent frontmatter with the boolean mapping required by current OpenCode releases.
  • Map Claude Code's AskUserQuestion capability to OpenCode's question tool for credential-hunter.
  • Add regression tests that enforce mapping-shaped, lowercase OpenCode tool definitions.

Type

  • Bug fix
  • New feature / scanner module
  • Methodology improvement
  • Documentation
  • False positive reduction

Root Cause

Current OpenCode validates agent tools as an object. The existing scalar values such as tools: Read, Bash, Glob, Grep cause configuration bootstrap to fail with SchemaError: Expected object | undefined, preventing provider, agent, and config startup requests from completing.

Test Plan

  • Focused regression test passes: uv run --with pytest --with requests pytest -q tests/test_opencode_agent_frontmatter.py (2 passed).
  • Full pytest tests/ passes locally. Current result: 371 passed, 1 failed; the unrelated existing failure is tests/test_brain_auto_detect.py::test_openai_and_grok_keys_both_front_nothing_available, whose expected provider order omits the currently probed Groq and DeepSeek providers.
  • No hardcoded targets, API keys, or real domain names.
  • New functionality has regression coverage.

Related Issue

No matching open issue or pull request was found before implementation.

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.

1 participant