Interview Bank
328 questions total; 1 shown with current filters.
CourseAllFrom Frontend Engineer to Agent Engineer in 30 DaysPrompt Engineering From Scratch in 5 DaysMastering Claude: From Conversation to Claude Code in 5 DaysMastering Codex and the OpenAI Agents SDK in 5 DaysMCP in 7 Days: Wire Tools Into Any AgentAgent Skills in 7 Days: Turn Experience Into Reusable CapabilityContext Engineering in 5 DaysRAG in 14 Days: From Retrieval to Trustworthy AnswersBuild an AI Short-Drama Production Pipeline With Agents in 14 Days
Mastering Codex and the OpenAI Agents SDK in 5 Days
D1 Getting Started With the Codex CLI: Install, AGENTS.md, Approval Modes and the Sandbox, Common Commands
Codex splits 'when to ask the user' and 'what can be touched' into two independent settings, approval_policy and sandbox_mode. Why separate them, and what does each solve?Codex 把「什么时候问用户」和「能碰到什么」拆成 approval_policy 和 sandbox_mode 两组独立开关。为什么要拆?各自解决什么问题?
Common in ChinaCommon overseasIntermediate#coding-agent#security#sandboxHow to reason about it · think before answering
- The discriminating part is 'why separate'; reciting the values without explaining orthogonality earns little.
- Define both: approval policy is process control, whether a human must nod before an action; sandbox is permission control, whether the OS allows the action at all.
- Then justify orthogonality with combinations a single slider cannot express: 'do not interrupt me but never leave the workspace' versus 'ask every time but read-only'.
- Ground it in implementation: the sandbox uses OS mechanisms (Seatbelt on macOS, bubblewrap on Linux) rather than model goodwill, so it is a hard limit, while approval is the one human checkpoint.
- Expect the follow-up: why is network off by default? Because network is the channel for code leaving or entering the machine, a different risk class from local edits.
分析过程 · 先想清楚再作答
- 题眼是「为什么拆」。只背出每组的取值等于没答,面试官要听的是两者正交带来的好处。
- 先给定义:审批策略是流程控制,决定动作执行前要不要人点头;沙箱是权限控制,决定即使模型想做、操作系统允不允许。
- 再说为什么正交:你可能想要「不打扰我,但绝不许出工作区」(on-request 加 workspace-write),也可能想要「每步都问,但只让它读」(untrusted 加 read-only);合成一个滑杆就表达不了这两种组合。
- 落到实现:沙箱靠操作系统机制(macOS Seatbelt、Linux bubblewrap),不是靠模型自觉,所以它是硬约束;审批则是唯一由人把关的环节。
- 可预期的追问:为什么网络默认关?因为联网是把内部代码送出去或把外部代码拉进来的通道,风险等级和改本地文件不同,需要单独授权。
Key points
- approval_policy governs process: untrusted / on-request / on-failure / never decide whether a human confirms first
- sandbox_mode governs permission: read-only / workspace-write / danger-full-access decide what the OS allows
- Orthogonality lets you express 'no interruptions but stay in the workspace' and 'ask each step but read-only'
- The sandbox is an OS-level hard limit, approval is the human checkpoint, and network is off by default
答题要点
- approval_policy 管流程:untrusted / on-request / on-failure / never 决定动作前是否要人确认
- sandbox_mode 管权限:read-only / workspace-write / danger-full-access 决定操作系统放行什么
- 两者正交才能表达「不打扰但不越界」和「步步问但只读」这类组合
- 沙箱是操作系统级硬约束,审批是唯一的人工把关点;网络默认关闭需单独放开