Skip to content

Use OpenCode's tool.execute.before event instead of AGENTS.md #71

Description

@johnsaigle

Claude Code does two things: writes a CLAUDE.md section telling Claude to read graphify-out/GRAPH_REPORT.md before answering architecture questions, and installs a PreToolUse hook (settings.json) that fires before every Glob and Grep call. ...
Codex, OpenCode, OpenClaw, Factory Droid write the same rules to AGENTS.md in your project root. These platforms don't support PreToolUse hooks, so AGENTS.md is the always-on mechanism.

I'm pretty sure this can be done via OpenCode's plugins system.

See:

I think this can even be scoped to just the Glob and Grep calls in OpenCode via a opencode.json file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions