Stop Tokenmaxxing. Start Proving Savings.

Agent Sidecar lowers Codex and Claude Code costs by turning every run into measurable, validated task economics.

Demo

Agent Sidecar inside a Codex workspace

agent-sidecar-demo
Sidecar task intake active

Codex coding session

Agent cost accrues while the task is still unresolved.

session.ts

src/auth/session.ts

01import { cookies } from "next/headers"

02import { redirect } from "next/navigation"

03import { refreshToken, readSession } from "./tokens"

04import { saveSession, clearSession } from "./store"

05import { validateSessionCookie } from "./validation"

06

07type User = {

08 id: string

09 email: string

10 session: string

11}

12

13export async function loadCurrentUser() {

14 const session = cookies().get("sid")?.value

15 if (!session) return null

16 return readSession(session)

17}

18

19export async function refreshSession(user: User) {

20 const token = await refreshToken(user.session)

21 saveSession(user.id, token)

22 return redirectAfterLogin(user)

23}

24

25function redirectAfterLogin(user: User) {

26 return redirect(`/account/${user.id}`)

27}

28

29export async function signOut() {

30 await clearSession()

31}

00:25
Privacy boundary

What Teams Can Read, What Stays Private

Local-first telemetry boundary

Enterprise visibility without opening the whole workspace

coded access map

Accessible / readable

Safe operational telemetry for engineering leaders, platform teams, and finance reviewers.

Run timeline

Tool calls, timestamps, exit states, and validation status

Cost evidence

Token estimates, model usage, validated traces, and task-cost calculations

Policy outcomes

Allowed actions, blocked waste, and reason codes for audit

Kept private

Sensitive code, credentials, and raw workspace context remain local by default.

Source contents

Repository files stay on the developer machine unless explicitly shared

Secrets

Environment variables, credentials, and protected paths are never exposed

Raw prompts

Sensitive task text can remain local while metadata rolls up for teams

How to use

Run normally, review everything

The dashboard is the separate control plane and replay UI. Developers keep coding in Codex while Agent Sidecar optimizes prompt context, routing, and telemetry in the background, then measures whether those optimizations improve cost per successful task.

1Install the sidecar package with pip
2Start the daemon from your terminal
3Code in Codex like normal while Agent Sidecar runs in the background
4Sidecar optimizes prompts, context, model routing, and telemetry behind the scenes
5Review original prompts, optimized prompts, cost evidence, result quality, decisions, and evidence-labeled analytics
Acme account dashboard

Live runs

Runtime control plane

daemon connected

guarded runs

18

decisions

43

saved lessons

9

validated cost reduction

$4,820

Estimated from successful traces, observed cost movement, and current model pricing.

prompt contract

scope and validation extracted before Codex runs

model route

narrow edits stay on the cheaper viable path

validated delta

cost movement counted after the task succeeds