terminal-native coding agent — plan/act/observe loop
turn lifecycle
plan
TodoWrite rewrite
act
dispatch tool call
observe
truncate + feed back
recover
retry / compact / stop
budgets
max_turns = 50
max_tokens = 200k
max_dollars = $5
PreCompact at 150k
Stop on any breach
tools (MCP StreamableHTTP)
read_file / edit_file
ripgrep / tree_sitter_symbols
run_shell (timeout)
git (status / diff / commit / push)
every call returns at most 4k tokens
every call runs inside the sandbox
sandbox (E2B / Daytona)
fresh devcontainer per task
git worktree add agent/TASK_ID
read-write inside tree only
no network unless allowlisted
worktree cleanup on Stop
success or failure, always
host filesystem stays untouched
credentials scoped by GitHub App
destructive commands blocked by hook
hook surface (2026 shape)
SessionStart / SessionEnd
PreToolUse / PostToolUse
UserPromptSubmit / Notification
Stop / PreCompact
reference user hooks:
· destructive-command guard
· token + dollar accounting
· OTel span emitter per tool call
· trace bundle writer on Stop
observability
OpenTelemetry GenAI semconv
one span per tool call
tokens + $ attached as attributes
Langfuse self-hosted sink
trace bundle ships with PR body
SWE-bench Pro target: pass@1 at or above mini-swe-agent baseline, under $5 per task