Skip to content

feat(agent): enforce Guardian action review - #1082

Merged
dcramer merged 27 commits into
mainfrom
codex/guardian-tool-review
Jul 30, 2026
Merged

dcramer merged 27 commits into
mainfrom
codex/guardian-tool-review

Conversation

@dcramer

@dcramer dcramer commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Junior now enforces declared tool approval metadata immediately before execution. Core validates authoritative actor, conversation, credential, source, destination, and semantic tool input; actions that require review go to Guardian for a structured allow, ask, or deny decision. Missing context, unavailable review, and decision-log persistence failures fail closed.

Guardian uses the Codex transcript selection rules: it receives bounded user and assistant messages, recent tool calls and results, first/latest user anchors, prior rejected actions, and the exact pending action. Reasoning and runtime scaffolding remain excluded, as do hook-injected execution-only environment values and signed credential bindings. Guardian defaults to openai/gpt-5.6-luna, with AI_GUARDIAN_MODEL available as an explicit override.

ask and deny return to the primary agent as structured rejected tool results, so the primary agent owns the user-facing response. Exact human confirmation is bound to durable rejection state and same-actor intent, and every retry is reviewed again. Guardian decisions are also recorded as privacy-safe guardian_action_reviewed conversation events before an approved action can execute.

The review path is serialized, bounded to three consecutive rejections per execution slice, and covered across runtime enforcement, retry and resume continuity, credential isolation, event reporting, and live confirmation and denial evals.

Fixes #1053.

@vercel

vercel Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Jul 30, 2026 8:17pm

Request Review

Comment thread packages/junior/src/chat/agent/index.ts Resolved
Comment thread packages/junior/src/chat/agent/index.ts Resolved

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 8fd1cb00 Deployed Jul 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high trigger-evals Run evals on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Guardian review for permissioned tool actions

1 participant