JEV Control Plane

September 20, 2026 ยท View on GitHub

CI License

Describe the task. Let JEV Control Plane choose the runtime for your coding agent.

JEV Control Plane is an open source decision and routing layer for AI coding agents, including Codex and Claude Code. It evaluates each request and recommends an appropriate model, reasoning level, execution path, and safety posture before work begins. You do not need to memorize which model is best for quick classification, ordinary implementation, architecture, production work, or critical review.

Most importantly, the routing decision does not consume the coding agent's reasoning tokens. JEV is a System One decision model. It reads the supplied state and returns typed decisions with probabilities instead of generating text or an autoregressive chain of thought. This leaves the coding model's reasoning budget available for the development work itself. See TypeSafe's introduction to JEV and the System One announcement.

The decision considers task complexity, project scope, repository identity, environment, reversibility, and operational risk. Verified local facts and fixed safety rules remain authoritative before the coding agent acts.

Why use it

Choosing a model is part of the work. The right choice can change with the size of the task, the tools involved, the amount of reasoning required, and the consequences of getting it wrong.

JEV Control Plane delegates that routing decision to AI while preserving deterministic local controls. Small and repeatable tasks can receive a faster runtime. Everyday development can receive a balanced runtime. Complex or sensitive work can receive deeper reasoning and stronger models.

JEV still reads input tokens, and the router may have its own provider cost. The selected development model also uses the normal allowance or billing for its host after work begins. The benefit is that model selection and routing do not spend the coding agent's reasoning tokens.

Features

Automatic runtime selection

  1. Evaluates each request before delegated work begins.
  2. Selects a runtime profile based on complexity, risk, scope, and execution requirements.
  3. Selects both the runtime model and reasoning effort.
  4. Applies the decision directly to new delegated threads.
  5. Applies updated routing decisions to follow up messages sent to existing threads.
  6. Supports configurable model mappings for every routing profile.

Project aware decisions

  1. Reads project goals, scope, exclusions, definition of done, expected services, environment, and production policy from .jev/project.json.
  2. Detects the current Git repository, remote, branch, and working tree state.
  3. Classifies work as inside scope, a necessary dependency, a change request, unrelated, or unknown.
  4. Recommends whether work should remain in the current thread or move to a new thread.
  5. Recommends an isolated worktree only when the project is a Git repository.

Safety and control

  1. Applies deterministic risk floors for production, billing, authentication, permissions, database migrations, schema changes, secrets, OAuth, DNS, integrations, APIs, and webhooks.
  2. Prevents the decision model from weakening verified safety rules.
  3. Requires confirmation for production or difficult to reverse actions when policy requires it.
  4. Blocks external writes when the repository does not match the configured project.
  5. Blocks consequential external work when required project context is missing.
  6. Offers read only GitHub, Supabase, and Vercel identity checks before consequential external operations.

Reliability, privacy, and auditing

  1. Uses confidence thresholds before accepting subjective routing changes.
  2. Falls back to a labeled local rules engine when JEV is unavailable.
  3. Redacts common credentials before sending compact context to the configured router.
  4. Stores a SHA 256 prompt digest instead of the raw prompt in local decision logs.
  5. Rotates audit logs by size.
  6. Requires bearer authentication and HTTPS for remote router endpoints.
  7. Records the provider, decision model, scope, risk, thread choice, worktree recommendation, runtime profile, reasoning effort, confirmation state, and external write state.

Tested and open

  1. Includes 33 automated tests for routing, safety, fallback behavior, privacy, model mappings, endpoint security, and hook behavior.
  2. Runs continuous integration on macOS and Ubuntu with Python 3.10 and Python 3.12.
  3. Type checks the included TypeScript router.
  4. Includes formal schemas, configuration guidance, a security model, and a verification report.
  5. Is open source under the Apache License 2.0.

More routing profiles, easier setup, richer visibility, and broader host support are planned for future updates.

Agent support

The decision engine is agent independent and is available through a local command interface and a documented JSON router contract. It can be invoked from Codex, Claude Code, or another agent environment.

This repository currently bundles the deepest automation for Codex. Its hooks inject decision context and apply the selected runtime when Codex creates or continues delegated threads. Claude Code can call the same decision engine from its command and hook workflows. A dedicated Claude Code adapter is planned to make installation and automatic runtime application as direct as the bundled Codex experience.

What it does

For Codex, JEV Control Plane provides two complementary hooks:

  1. UserPromptSubmit adds a compact decision packet to the current turn. It reports the decision provider, JEV model, scope, risk, thread recommendation, worktree recommendation, model profile, reasoning level, confirmation state, and external write state.
  2. PreToolUse intercepts delegated create_thread and send_message_to_thread calls. It places the selected runtime model and reasoning level directly into the tool input before that child turn begins.

The current Codex turn has already selected its runtime before UserPromptSubmit runs. The plugin therefore reports guidance for the current turn and enforces runtime routing on delegated turns.

Routing defaults

ProfileRuntime modelReasoningTypical work
rapid_decisiongpt-5.6-lunalowClassification and short explanations
balanced_buildgpt-5.6-terramediumOrdinary implementation work
complex_buildgpt-5.6-solhighArchitecture and difficult debugging
critical_reviewgpt-6-astrahighProduction, billing, security, and destructive work

Every runtime mapping can be overridden with an environment variable. See configuration.

Safety model

JEV handles the subjective routing decision. Local rules remain authoritative for deterministic facts and safety floors.

The plugin:

  1. Preserves explicit project scope exclusions.
  2. Refuses to treat a missing project manifest as approved scope.
  3. Prevents JEV from lowering deterministic risk floors.
  4. Keeps explicit continuations in the current thread.
  5. Requires a Git repository before recommending a worktree.
  6. Marks repository mismatches and unresolved consequential work as blocked for external writes.
  7. Requires confirmation for production work when project policy enables that rule.
  8. Uses a labeled deterministic fallback when JEV is unavailable.

Requirements

  1. Codex with plugin and hook support.
  2. Python 3.10 or newer.
  3. A private HTTPS router endpoint backed by typesafe-ai/jev.
  4. A shared bearer token for the router endpoint.

The hook script has no third party Python runtime dependencies. Development validation uses the packages listed in requirements-dev.txt.

Install

Add the public GitHub repository as a marketplace source, then install the plugin:

codex plugin marketplace add JxWayne890/jev-control-plane
codex plugin add jev-control-plane@jev-control-plane

Install and enable jev-control-plane from the Codex Plugins Directory. Review and trust both bundled hooks. Codex does not automatically trust hooks merely because a plugin is installed.

Create a project manifest:

mkdir -p .jev
cp plugins/jev-control-plane/examples/project.json .jev/project.json

Replace the example values with your own nonsecret project context.

Configure the router endpoint:

export JEV_ROUTER_ENDPOINT="https://your-project.vercel.app/api/jev/route"
export JEV_ROUTER_TOKEN="replace-with-your-shared-secret"

On macOS, JEV_ROUTER_TOKEN can instead be stored in Keychain under the service name jev-control-plane-router.

A drop in Vercel route example is included at plugins/jev-control-plane/examples/vercel-router.

Verify the installation

Run a local decision:

python3 plugins/jev-control-plane/scripts/jev_control_plane.py decide \
  --prompt "Add a contact form" \
  --cwd /path/to/project \
  --json

Run the repository checks:

python3 -m pip install -r requirements-dev.txt
python3 scripts/check_repo.py

Use this prompt in Codex to verify delegated runtime routing:

Create four separate Codex threads. Give each thread exactly one task. First, classify five file extensions. Second, add a small form validation feature. Third, redesign a service architecture. Fourth, review a production database migration. After creating them, report each thread title, model, and reasoning level.

The expected profiles are rapid_decision, balanced_build, complex_build, and critical_review. Runtime model availability still depends on the Codex host. Override a mapping if a default model is unavailable.

Privacy

Prompt text and compact project context are sent to the endpoint you configure. The plugin performs best effort redaction for common secret formats before sending that request. This is not a substitute for keeping credentials out of prompts and project manifests.

Local decision logs contain a SHA 256 prompt digest, not the raw prompt. Logs rotate by size and remain in the plugin data directory. See security model for the full trust boundary.

Documentation

  1. Configuration
  2. Router API
  3. Security model
  4. Verification report
  5. Release checklist
  6. Architecture design
  7. Contributing
  8. Security policy
  9. Launch post drafts

License

Licensed under the Apache License 2.0. See LICENSE.

Creator

Created by John W. Johnson.

  1. GitHub
  2. X
  3. Instagram
  4. Facebook