Inspiration

AI coding agents have become incredibly capable, but they still face a fundamental trust problem: a single mistaken command can modify production code, execute destructive shell commands, or expose sensitive data.

Current workflows often rely on manual vigilance or simple allow/deny prompts, leaving developers to make high-stakes decisions with limited context.

I wanted to explore a different approach: instead of making AI agents "smarter," what if we made their execution safer?

That idea became Agent Preflight.


What it does

Agent Preflight is a deterministic safety layer that sits between coding agents and code execution.

Instead of blindly allowing tool calls, it evaluates every action against explicit policies before execution.

Depending on the configured protection level, it can:

  • Require exact human approval for sensitive operations.
  • Block dangerous commands before execution.
  • Prevent replay attacks using deterministic request hashing.
  • Record evidence for every intervention.
  • Ask GPT-5.6 for contextual advisory while keeping the final decision deterministic.
  • Simulate protected workflows through guided demos.

The goal is not to replace AI agents—it is to make them safer to trust.


How I built it

The project is built with:

  • Next.js
  • React
  • TypeScript
  • SQLite
  • GPT-5.6 via the OpenAI Responses API
  • Codex
  • Vercel

The core architecture separates deterministic policy enforcement from AI reasoning.

GPT-5.6 provides contextual analysis and recommendations, but policy enforcement remains deterministic and fully auditable. This design ensures that safety decisions are reproducible rather than dependent on probabilistic model outputs.

The application includes a simulated fleet of coding agents, execution history, policy management, evidence timelines, replay protection, and guided demonstrations that showcase how protected execution works in practice.


Challenges

One of the biggest challenges was deciding where AI should help—and where it should not.

It is tempting to let an LLM make security decisions directly, but that creates inconsistent behavior and makes auditing difficult.

Instead, I designed the system so that GPT acts as an advisor while deterministic policy remains the final authority.

Another challenge was creating realistic demonstrations that clearly communicate the workflow without requiring complex external infrastructure.


Accomplishments

The final project includes:

  • Deterministic policy enforcement.
  • Human approval workflows.
  • Replay protection.
  • Evidence timelines.
  • Live GPT advisory.
  • Interactive guided demos.
  • Production deployment.
  • Comprehensive documentation.
  • Automated validation checks for competition readiness.

Throughout development, the project was continuously validated with Codex, allowing rapid iteration while maintaining code quality and consistency.


What I learned

This project reinforced an important lesson:

The future of AI development is not just about building more capable agents—it is about building systems that make those agents trustworthy.

I also gained valuable experience designing AI-assisted workflows where deterministic software engineering and large language models complement each other instead of competing.


What's next

Future work includes:

  • Support for additional coding agents.
  • Pluggable policy engines.
  • Team collaboration features.
  • Richer audit reporting.
  • Integration with CI/CD pipelines.
  • Enterprise deployment options.

The long-term vision is to make Agent Preflight a reusable safety layer that can protect AI-assisted software development regardless of which coding agent is being used.

Built With

Share this project:

Updates