QuotaCheap Playbook

Codex Agent Ops: quản trị chi phí, sandbox, approval và automation trước khi coding agent thành thói quen

Hướng dẫn vận hành Codex coding agent trong team: sandbox, approvals, permission profiles, AGENTS.md, automations, worktrees, logs, quota/cost visibility,…

Coding agent càng hữu ích thì càng dễ chạy nhiều. Muốn dùng Codex bền trong team, cần quản trị quyền, network, worktree, automation cadence, logs, token usage và definition of done.

Playbook tiếng Việt chốt series Codex Agent Playbook: vận hành Codex trong team với sandbox/approvals, permission profiles, config.toml, network policy, AGENTS.md, automations, worktrees, logs, cost visibility, quotas, governance metrics và rollout checklist.

Coding agent thường bắt đầu như một tiện ích cá nhân: sửa bug nhanh hơn, viết test đỡ chán hơn, review diff thêm một lớp.

Rồi vài tuần sau, team bắt đầu dùng nó trong IDE, CLI, cloud task, PR review, MCP, automations.

Lúc đó câu hỏi không còn là “agent có code được không?”.

Câu hỏi là: “mình vận hành agent này thế nào để nó không tạo rủi ro và hóa đơn mù?”.

Đây là phần nhiều team bỏ qua.

Họ học prompt, bật full access vì tiện, gắn vài MCP server, set automation chạy định kỳ, rồi gọi đó là productivity.

Nhưng agent ops không phải chuyện xa xỉ.

Nếu coding agent có thể đọc repo, sửa file, chạy command, gọi network, comment PR, inspect Sentry, hoặc fix CI, thì bạn đã có một execution surface mới trong engineering workflow.

Theo tài liệu OpenAI, Codex security controls đến từ hai lớp: sandbox mode quyết định Codex technically can do what; approval policy quyết định when Codex must ask before acting.

Codex cloud chạy trong isolated OpenAI managed containers.

Local CLI/IDE dùng OS level sandbox, default thường là no network access và write permissions limited to active workspace.

Bài này chốt series Codex Agent Playbook bằng phần vận hành: sandbox, approvals, permission profiles, network policy, automations, worktrees, AGENTS.md, logs, cost visibility, rollout và metrics.

Agent mạnh thì tốt.

Agent mạnh mà không có governance thì chỉ là “chạy nhanh về phía chưa biết”.

Agent ops là cách bạn quản trị coding agent như một phần của engineering system.

Nó gồm: quyền đọc/ghi filesystem; network access; approval policy; secrets exposure; MCP/tool side effects; cloud environment setup; automation cadence; worktree isolation; prompt and AGENTS.md standards; review and verification rules; logs, token usage, latency, cost; team rollout và incident feedback loop.

Nếu chỉ có một dev dùng Codex local để giải thích code, ops nhẹ.

Nếu team dùng Codex cho PR review, CI fix, cloud tasks, MCP và scheduled automations, ops không nhẹ nữa.

Câu hỏi trung tâm: Codex được phép làm gì, ở đâu, khi nào, với dữ liệu nào, ai review, và làm sao biết nó đáng tiền?

Hai nút chính: sandbox và approval Docs agent approvals & security nói Codex controls đến từ sandbox mode và approval policy.

Sandbox mode Sandbox mode là boundary kỹ thuật: Codex có được write file không?

Chỉ trong workspace hay ngoài workspace?

Có network không?

Có chạm protected paths không?