You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A SandboxExecutor becomes responsible for remote task lifecycle
Tracked by this issue
Moving more of the task into a sandbox is not automatically safer for every use case. A whole-task executor normally provides the Task SDK workload with scoped Airflow API access, while sandbox-as-tool can deliberately keep the agent's credentials outside the generated-code environment.
Future SandboxExecutor responsibilities
A sandbox runtime's create/run/destroy operations are not, by themselves, an Airflow executor contract. A production executor must additionally handle:
deterministic workload identity and idempotent submission;
capacity, queueing, heartbeat, and terminal-state reconciliation;
Task SDK token and DAG-bundle delivery;
durable task logs and result state;
cancellation and forced termination;
scheduler-restart adoption and external resource lookup;
sandbox disappearance, ambiguous provider responses, and retry safety;
leases, TTLs, and leaked-resource reaping;
files, artifacts, secrets, network policy, and provider trust boundaries.
The implementation should use Airflow's existing public BaseExecutor and ExecuteTask interfaces rather than treating the agent-focused backend in #68847 as the executor SPI.
Motivation
Potential use cases include:
isolated per-task dependencies and runtime images;
bursty or heavyweight jobs without a shared worker image;
stronger infrastructure boundaries for sensitive workloads;
ephemeral remote compute without requiring every installation to operate Celery or Kubernetes workers.
A whole-task executor is not the same security solution as isolating only model-generated code. Both may eventually be useful and composable.
Scope
This issue tracks a future
SandboxExecutorthat would run a complete Airflow Task SDKExecuteTaskworkload in an isolated, ephemeral runtime.It does not track the narrower agent code-execution tool proposed by #68847, and #68847 does not close this issue.
Sandboxed-execution surfaces
These are separate execution boundaries, not one API and not a monotonic security ranking:
AgentOperator(code_mode=True)orchestrates registered worker-side toolsSandboxOperatorcould manage files, artifacts, cancellation, and reconnectionExecuteTaskworkloadSandboxExecutorbecomes responsible for remote task lifecycleMoving more of the task into a sandbox is not automatically safer for every use case. A whole-task executor normally provides the Task SDK workload with scoped Airflow API access, while sandbox-as-tool can deliberately keep the agent's credentials outside the generated-code environment.
Future SandboxExecutor responsibilities
A sandbox runtime's
create/run/destroyoperations are not, by themselves, an Airflow executor contract. A production executor must additionally handle:The implementation should use Airflow's existing public
BaseExecutorandExecuteTaskinterfaces rather than treating the agent-focused backend in #68847 as the executor SPI.Motivation
Potential use cases include:
A whole-task executor is not the same security solution as isolating only model-generated code. Both may eventually be useful and composable.
Proposed progression
SandboxToolsetin Add SandboxToolset for isolated agent code execution in common.ai #68847.SandboxExecutoragainstBaseExecutorandExecuteTask.Related work
common.ai.