agentgate
agentgate guides/trace-codex-requests

Request tracing

Trace Codex model requests locally.

AgentGate records Codex request routing, provider choice, errors, token usage, and cost in a local dashboard.

direct answer

Short answer: AgentGate records Codex request routing, provider choice, errors, token usage, and cost in a local dashboard.

Best fit

  • You want AI apps to keep one stable local endpoint.
  • You need provider switching, request logs, cost visibility, or failover.
  • You want client config changes to be reversible.

Not ideal

  • You use one client, one provider, and the setup rarely changes.
  • You do not need logs, failover, cost tracking, or config rollback.

The problem

When a client talks directly to a provider, failed requests and cost spikes are hard to inspect. AgentGate makes the request path visible before it leaves your machine.

What AgentGate records

You can inspect route profile, upstream provider, model, status, latency, token usage, estimated cost, and failover behavior when available.

How to use it

Apply the Codex config, run a request, then open the Logs page. Filter by client or provider to understand which route handled the request.

agentgate --faq

FAQ.

Are logs stored remotely?

No. AgentGate is local-first and stores request traces locally.

Can I debug failed provider calls?

Yes. The logs and diagnostics pages are designed for exactly that workflow.