Use configured rules for VSCode extensions
Resolved 💬 3 comments Opened Jan 13, 2026 by amit-mittal Closed Jan 13, 2026
What version of the VS Code extension are you using?
0.4.58
What subscription do you have?
Enterprise
Which IDE are you using?
VS Code
What platform is your computer?
Darwin 24.4.0 arm64 arm
What issue are you seeing?
I have a rules file configured in my repo's rules folder as well as under $CODEX_HOME/rules, but none of them are being considered by the VSCode extension in the agent mode and it is still prompting me for the approved commands.
What steps can reproduce the bug?
- Create
~/.codex/rules/gh.rulesor<repo-root>/.codex/rules/gh.ruleswith
prefix_rule(
# The prefix to match.
pattern = ["gh", "pr", "view"],
# The action to take when Codex requests to run a matching command.
decision = "approve",
# Optional rationale for why this rule exists.
justification = "Viewing PRs is allowed with approval",
# `match` and `not_match` are optional "inline unit tests" where you can
# provide examples of commands that should (or should not) match this rule.
match = [
"gh pr view 7888",
"gh pr view --repo openai/codex",
"gh pr view 7888 --json title,body,comments",
],
not_match = [
# Does not match because the `pattern` must be an exact prefix.
"gh pr --repo openai/codex view 7888",
],
)
- Invoke this command from the extension, but still it will be prompted for approval.
What is the expected behavior?
Not prompt and automatically run the command
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗