Background
The /review:auto command toggles auto-review on/off. Currently it works by having an LLM agent parse the user's argument and call the toggle_auto_review tool. This means:
- Wastes an LLM call just to flip a boolean (unnecessary tokens + latency)
- Logic depends on the LLM's interpretation, which is fragile
- State is in-memory only, lost on restart
Desired behavior
The command.execute.before hook should be able to:
- Parse the argument directly (
on / off)
- Update the state
- Return a response to the user
- Skip the LLM call entirely
Upstream dependencies
Temporary workaround (until upstream merges)
Background
The
/review:autocommand toggles auto-review on/off. Currently it works by having an LLM agent parse the user's argument and call thetoggle_auto_reviewtool. This means:Desired behavior
The
command.execute.beforehook should be able to:on/off)Upstream dependencies
command.execute.beforehooknoReplyfield to command schemaTemporary workaround (until upstream merges)
autoEnabledstate to a file (.opencode/.review-state.json) so users can also edit it directlycommand.execute.before, so the LLM only echoes the result