Overview
T3 Code provides two primary runtime modes accessible via the chat toolbar:Full Access
Default mode with maximum autonomy. Sessions start with
approvalPolicy: never and sandboxMode: danger-full-access.Supervised
Safety-first mode with user approval required. Sessions start with
approvalPolicy: on-request and sandboxMode: workspace-write, prompting for command/file approvals.Runtime Mode Types
TheRuntimeMode type defines the high-level security posture:
packages/contracts/src/orchestration.ts
Runtime modes are set at session creation and affect the entire conversation lifecycle. They map to specific Codex approval policies and sandbox modes.
Approval Policies
Approval policies determine when the agent must request user permission:Approval Policy Mapping
T3 Code maps runtime modes to Codex approval policies:apps/server/src/codexAppServerManager.ts
Sandbox Modes
Sandbox modes restrict file system and system access:Approval Request Types
When approval is required, the agent requests permission for specific operations:Approval Request Flow
Agent Requests Approval
The agent sends an approval request via JSON-RPC (e.g.,
item/commandExecution/requestApproval)Server Generates Request ID
The server creates a unique
ApprovalRequestId and tracks the pending requestApproval Decisions
Users can respond to approval requests with four decision types:User Input Requests
Beyond approval requests, agents can request structured user input:User input requests are separate from approval requests and are primarily used in Plan Mode for collaborative planning conversations.
Runtime Mode Changes
Runtime modes can be changed during a thread’s lifetime:Session Status and Runtime Mode
The orchestration session tracks the active runtime mode:Pending Approval Tracking
The server tracks pending approvals in memory:apps/server/src/codexAppServerManager.ts
Service Tier
Independent of runtime mode, you can specify compute service tier:Interaction Modes
Interaction modes control conversation behavior:Default Mode
Default Mode
Standard execution mode where the agent directly implements requests.
- Minimal questions, bias toward action
- Direct execution of user requests
request_user_inputtool unavailable
Plan Mode
Plan Mode
Collaborative planning mode for refining specifications before implementation.
- Three-phase conversation: environment grounding, intent chat, implementation chat
request_user_inputtool available for structured questions- Non-mutating exploration allowed (read files, run tests)
- Mutating actions blocked until plan finalized
- Outputs
<proposed_plan>blocks when ready
Interaction modes are orthogonal to runtime modes. You can use Plan Mode with either
full-access or approval-required runtime mode.Best Practices
Start Supervised
Use
approval-required for unfamiliar codebases or destructive operationsPlan Before Execute
Use Plan Mode for complex changes to validate approach before implementation
Session-Scoped Approvals
Use
acceptForSession for repetitive safe operations like test runsReview Declined Actions
Check activity logs to understand why declined operations were attempted
Security Considerations
Supervised Mode Limitations:
workspace-writerestricts writes to workspace directory- Read access still available outside workspace
- Agent cannot execute commands without approval
- May require more user interaction
Next Steps
Sessions
Learn about session lifecycle and management
Providers
Understand provider adapter architecture
Architecture
Explore the overall system design
