Autonomous mode lets an AI agent (Claude Code, Codex, or OpenCode) work end-to-end on a task — analyzing the codebase, planning, writing code, running tests, and creating a PR — all without step-by-step human oversight.
| Use Case | Recommended Mode |
|---|---|
| Simple bug fixes, well-defined tasks | Autonomous |
| Large refactors where you want per-phase control | Pipeline |
| Tasks where you trust the agent to self-review | Autonomous |
| Tasks requiring human review at each step | Pipeline |
| Exploratory tasks ("improve performance of X") | Autonomous |
| Compliance-sensitive changes | Pipeline |
Set the execution mode on a project's autonomy configuration:
# Via API
curl -X PATCH http://localhost:8000/api/projects/my-project \
-H "Content-Type: application/json" \
-d '{
"autonomy_config": {
"execution_mode": "autonomous",
"plan_approval": "none"
}
}'
Or configure it in the Project Settings → Autonomy panel in the web UI.
| Mode | Behavior |
|---|---|
structured | Default flow-prompt run: workspace_setup → init → agent (implement) → finalization |
autonomous | Single agent loop — agent drives everything |
hybrid | Platform does init phase, then agent takes over |
Control how much oversight the agent gets:
| Setting | Behavior |
|---|---|
none | Agent proceeds without stopping (fully autonomous) |
show_and_continue | Agent's plan is shown in the UI, execution continues after 5s |
require_approval | Agent's plan is shown, execution pauses until you approve |
adaptive | Auto-approve small changes, pause for large ones |
For complex tasks that may exceed a single agent session, enable episodic execution. The agent works in bounded episodes with git checkpoints between each.
{
"autonomy_config": {
"execution_mode": "autonomous",
"episode_config": {
"max_episodes": 5,
"max_turns_per_episode": 30,
"stall_timeout_seconds": 600
}
}
}
--max-turns limitEpisode 1: Analyze codebase, write initial implementation
→ git checkpoint (abc1234)
→ context summary: "Created auth middleware, 3 endpoints"
Episode 2: Continue with tests and edge cases
→ git checkpoint (def5678)
→ context summary: "Added 15 tests, fixed login flow"
Episode 3: Final review and cleanup
→ task complete → PR created
If an agent session crashes, the SSH connection drops, or the server restarts:
No manual intervention needed — the task continues automatically.
If the agent produces no output for the configured timeout (default: 10 minutes), the platform:
Set per-project limits to prevent runaway costs:
{
"max_budget_usd": 10.00,
"max_turns_per_episode": 30,
"max_episodes": 5,
"max_total_duration_seconds": 7200,
"stall_timeout_seconds": 600,
"max_files_changed": 50
}
If any limit is exceeded, the agent is stopped and the run is marked accordingly.
The run detail page shows a live episode timeline:
An SSE endpoint streams real-time agent activity:
GET /api/runs/{run_id}/agent-stream
While an agent is running autonomously, you can:
# Send instruction to running agent
curl -X POST /api/runs/123/agent/message \
-d '{"message": "Focus on the authentication tests first"}'
# Pause the agent
curl -X POST /api/runs/123/agent/pause
# Resume
curl -X POST /api/runs/123/agent/resume
# 1. Create a project
curl -X POST /api/projects -d '{
"project_id": "my-app",
"repo_url": "https://github.com/org/my-app",
"git_provider": "github",
"autonomy_config": {
"execution_mode": "autonomous",
"episode_config": {
"max_episodes": 5,
"max_turns_per_episode": 30
}
}
}'
# 2. Create a task
curl -X POST /api/runs -d '{
"project_id": "my-app",
"title": "Add user authentication",
"description": "Implement JWT auth with login/register endpoints, password hashing, middleware, and full test coverage"
}'
# 3. Monitor (or just wait for the PR)
curl /api/runs/1/episodes
# 4. Approve the PR when ready
curl -X POST /api/runs/1/approve
autonomy_config Fields| Field | Type | Default | Description |
|---|---|---|---|
execution_mode | string | structured | structured, autonomous, or hybrid |
plan_approval | string | none | none, show_and_continue, require_approval, adaptive |
agent_timeout_seconds | int | 5400 | Max time for legacy single-invocation mode |
episode_config | object | null | Enable episodic execution (see below) |
episode_config Fields| Field | Type | Default | Description |
|---|---|---|---|
max_episodes | int | 5 | Maximum number of episodes per run |
max_turns_per_episode | int | 30 | Agent turns before episode ends |
stall_timeout_seconds | int | 600 | Seconds of no output before stall detection |