In short.
This OpenRouter tutorial helps coding-agent users automate routine shell approvals, but safe use depends on maintaining explicit command rules and understanding what context each agent supplies. Its TypeScript recipe queries typesafe/jev-1.13 through the Decisions endpoint and approves only when every requested score reaches 0.9. OpenCode supplies the latest user message, Claude Code supplies an agent-written description, and the Codex and Cursor examples assess reversibility without checking the user's task. The page reports a few dated API results; the integrations were not executed or independently tested for this report, and their unsafe-approval rate is unknown.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected page at the exact supplied OpenRouter address, including shared TypeScript code, all four agent integrations, warnings, reported outputs and proposed checks. The documentation index, linked documentation, repositories, pricing pages and related recipes are excluded. Source-reported observations are distinguished from proposed validation. No integration, command or API request was executed, and no end-to-end reliability or safety benchmark is established. The page supplies no explicit redistribution license.
The overview
Identity
The resource is an OpenRouter cookbook tutorial at [https://openrouter.ai/docs/cookbook/coding-agents/auto-approve-permission-prompts-with-jev.md]. It teaches developers to assemble a TypeScript permission checker from shared functions and an agent-specific entry point.
Jev supplies probability scores for approval questions. The surrounding code decides whether to approve the pending command or leave it to the agent's normal permission handling. The page also identifies Jevvy as a separate installable OpenCode plugin using this pattern.
Assessment
The tutorial is useful for supervised development sessions where repeated approvals for tests and file inspection interrupt work. Its practical strengths are visible decision logic, separate handling for risky command patterns, and configuration examples that explain differences between four agents.
The evidence supports using it as a customization recipe. It does not establish dependable security classification: there is no representative evaluation of unsafe approvals, probability calibration, prompt reduction or end-to-end reliability. A developer must remain responsible for host deny rules and the project's risk list.
Users
The intended users are developers already working with OpenCode, Claude Code, Codex CLI or Cursor who want fewer interruptions while retaining permission prompts. Beginners need enough familiarity with project configuration, API keys and TypeScript files to assemble and maintain the example.
Experienced developers can adapt the risk patterns, questions and threshold. Users who require approval decisions to reflect their actual request should examine the context differences carefully: only the OpenCode example retrieves a user message, and even that message is truncated to 2,000 characters.
Capabilities
The shared checker screens command strings for patterns covering privilege escalation, shell evaluation, recursive deletion, Git pushes and destructive operations, publishing, selected deployment commands and recognizable credential paths. A match prevents automatic approval and avoids a Decisions request; the filter itself does not permanently prohibit execution.
Remaining commands can receive automatic approval for one request. The code creates no saved permission rule. OpenCode, Claude Code and Codex integrations act on relevant pending approvals, while Cursor's hook runs before every shell command unless its configuration restricts matching.
The Decisions response includes identifiers and usage information that could support logging. The supplied implementation does not add an approval or cost log.
Using it
Requirements
The recipe assumes a coding agent already configured to use OpenRouter and an OPENROUTER_API_KEY with credits. It specifies OpenCode 2.0.12 or later, or Claude Code, Codex CLI or Cursor. Bun runs the standalone hook scripts; OpenCode uses its own plugin runtime.
The implementation requires project configuration changes and access to OpenRouter's Decisions service. No operating-system requirement, minimum Bun version or exact Claude Code and Cursor release is supplied. The page ties its OpenCode implementation to v2.0.12 and describes Codex observations from CLI 0.155.1.
Mechanism
The first stage examines command text locally. It splits compound commands, strips selected wrappers and prefixes, and compares the resulting strings with regular expressions. Certain substitutions and ambiguous forms immediately return the request to ordinary permission handling.
The second stage sends commands, project path and any available task to [https://openrouter.ai/api/alpha/decisions] using typesafe/jev-1.13. Jev answers yes-or-no questions, called Nouls, with numbers between zero and one. The default threshold requires every asked score to be at least 0.9.
With task context, the questions assess reversibility and relevance to the task. Without it, only reversibility is assessed. Network failures, unsuccessful responses, unreadable JSON and invalid scores produce no affirmative decision. The request timeout is eight seconds; that is a configured limit, not a measured response time.
Setup
Implementation involves combining the shared filter and Decisions function with one agent-specific entry point. OpenCode loads the resulting file from .opencode/plugins/. Its shell permission must be set to ask in opencode.json so the plugin has pending requests to evaluate. The page says host deny rules take precedence.
Claude Code registers the shared permission script in .claude/settings.json. Codex registers it in .codex/hooks.json and requires the project configuration to be trusted, followed by review and trust of new or changed hooks through /hooks. Both examples use a Bash matcher and a 15-second hook timeout.
Cursor uses a separate entry point and .cursor/hooks.json with failClosed set to true. That setting matters because the page describes Cursor's default crash and timeout behavior as allowing execution. A valid ask response and a crashed hook are different cases.
For a reported Codex CLI 0.155.1 environment issue, the page proposes a Git-ignored project .env file because the hook did not receive OPENROUTER_API_KEY. This is a version-specific observation, not proof that every Codex installation handles environment variables the same way.
Example
For a task to fix a date-parsing test, the page reports a Decisions capture dated 2026-09-21 in which bun test src/utils/date.test.ts scored 0.93 for reversibility and 0.95 for task relevance. Both exceed the example's 0.9 threshold.
In the same reported comparison, bun add left-pad scored 0.45 and 0.09, while npx wrangler deploy scored 0.04 and 0.07. Neither would receive approval from the scoring function. In the assembled hook, the deployment command is intended to match the static filter before any model request.
These are three source-reported API examples. They do not demonstrate that the full integrations worked across all four agents or establish an error rate on unfamiliar commands.
Assessment & evidence
Limitations
Jev sees the supplied text, not the underlying environment. The page explicitly warns that an ordinary-looking file read may access a secret whose filename is absent from the risk list. The command filter also does not inspect the contents of scripts invoked by a command. The model's reversibility score does not enforce a filesystem or network boundary.
Task alignment is weaker than the headline may suggest. Claude Code supplies the agent's own description rather than the user's request. The Codex example recognizes turn_id and omits the task question because its description is an approval question. Cursor supplies no task text.
The regular-expression filter is not a complete shell parser or an exhaustive catalog of dangerous commands. The guide calls for project-specific additions. A score of 0.9 has no demonstrated relationship here to a 90% real-world safety rate.
Fallback behavior depends on the host and execution mode. The page says Claude Code may deny undecided requests in noninteractive contexts. Cursor requires failClosed to block hook crashes and timeouts; handled API failures instead produce an ask response.
Reasoning
The design separates explicit rules from model judgment. Known risky command patterns stay under ordinary permission handling, while model scores address less clear questions about reversibility and relevance. Requiring every available score to clear the threshold makes the approval decision easy to inspect.
The source reports that scores vary with repeated requests and task wording. Raising the threshold may produce more prompts, but no evidence establishes how much it reduces unsafe approvals. Adding a command pattern to the static filter is a more direct response to a known unwanted approval than assuming a different score threshold will reliably catch it.
This supports a cautious fit assessment: the recipe can reduce repetitive decisions for developers who understand its inputs and maintain its rules. The evidence does not support treating the numerical threshold as an independent security guarantee.
Alternatives
The directly described baseline is manual approval with the agent's existing permission rules. It avoids an additional model request and its data transfer, while retaining the interruptions this tutorial aims to reduce.
The page identifies Jevvy at [https://github.com/PanAchy/jevvy] as an installable OpenCode plugin implementing this pattern. Its implementation and comparative suitability are not established because the linked repository is outside the supplied scope.
The page also mentions other models supporting OpenRouter's Decisions request format and a related three-outcome approval design. It provides no comparative evaluation. Changing models would require fresh threshold assessment rather than assuming Jev's illustrated scores transfer.
Evidence
The evidence consists of the complete selected documentation page at [https://openrouter.ai/docs/cookbook/coding-agents/auto-approve-permission-prompts-with-jev.md], captured on 2026-11-14T21:31:51.071Z as selected-page.txt. Its recorded source revision is sha256:89829dbe4cefcc761e78a4b2710a02a3c9349c5c9c836bc155ff7124b63d4d2a.
The page includes code, configuration, three reported Decisions responses and a separate reported Codex scoring example. It states that OpenCode hook details were checked against v2.0.12 source and other integrations against linked documentation. Those linked materials were not included.
No code was executed for this report. The page's proposed validation steps are instructions for future checks, not evidence that those checks passed. End-to-end operation, security outcomes and sustained prompt reduction remain unassessed.
Access & freshness
Costs
The page states that each request reaching Decisions is a paid check. Its reported example with 400 input tokens and 40 output tokens cost $0.0000168. The other two reported examples cost $0.000016674 and $0.000016758. These are historical request costs, not a verified current price schedule.
Static-filter matches make no Decisions request. Repeated eligible commands can generate repeated charges because approvals are not saved. Cursor can produce more checks than a hook limited to pending permission prompts because its example runs before every shell command.
Current unit prices, typical session spend and coding-agent subscription costs are unknown from this page. The coding model and approval checker can use the same OpenRouter key, but the supplied figures cover only the illustrated decision requests.
Rights
The supplied page contains no explicit license or redistribution grant for its prose or code. Permission to reuse or redistribute those materials is therefore unknown from the evidence. No license assessment is available for linked projects.
The checker transmits command strings, project paths and available task text to OpenRouter. The page does not establish applicable retention, training-use or confidentiality terms. Commands and task descriptions may themselves contain sensitive information even when no file contents are explicitly attached.
Freshness
The capture is dated 2026-11-14. Its explicit runtime observations date to 2026-09-21 for the three Decisions examples and 2026-09-22 for Codex CLI 0.155.1 behavior. The model identifier is typesafe/jev-1.13.
The OpenCode code targets the 2.x permission.hook evaluation interface and explicitly excludes the older 1.x permission.ask interface. Compatibility with other releases is not independently established. Current model availability, prices, hook contracts and Codex environment behavior are unknown beyond the captured statements.
Actions
Before relying on the recipe, confirm the hook contract for the installed agent version and review which command, path and task information will be sent remotely. Identify project-specific sensitive commands and retain host deny rules for actions that must remain prohibited.
In a disposable project, check a routine test command, an unrelated command, a static-filter match, a host-denied command and an API timeout. Confirm whether each case prompts, blocks or runs, including noninteractive execution where relevant. For Cursor, separately check a hook-process failure with failClosed enabled.
Start with the documented threshold as an example setting and collect labeled decisions before changing it. The response supplies request identifiers and usage costs for optional logging. These are recommended next steps; no successful validation is claimed.
