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
Part of #671 (PTY execution backend epic). Blocked by: #673 (PtyBackend), #676 (xterm.js), #677 (CLI integration).
Final integration issue: wire up backend selection in the orchestrator, update configuration, and document the feature.
Problem
The orchestrator's main.rs currently selects backend via AGENTD_BACKEND env var with two options: tmux (default) and docker. This needs to support pty as a third option, with proper configuration, validation, and documentation.
Changes
1. Orchestrator Backend Selection
In crates/orchestrator/src/main.rs, extend the backend match:
let backend:Arc<dynExecutionBackend> = match backend_type.as_str(){"tmux" => Arc::new(TmuxBackend::new("agentd-orch")),"docker" => {/* existing docker setup */},"pty" => Arc::new(PtyBackend::new("agentd-orch")),
_ => {/* error */}};
2. Wrap Service Backend Selection
The standalone wrap service (crates/wrap/src/main.rs) currently only uses TmuxManager directly in its API handlers. It should also support backend selection for consistency.
3. Configuration Documentation
Document the three backends with their trade-offs:
Backend
Dependency
PTY Streaming
Health Check
Web Terminal
Use Case
tmux
tmux binary
❌
❌ (always Unknown)
❌
Default, simple, battle-tested
docker
Docker daemon
❌
✅
❌
Isolated execution, resource limits
pty
None
✅
✅
✅
Web terminal, no external deps
4. Feature Detection
Add a capability endpoint so clients can discover what the active backend supports:
Context
Part of #671 (PTY execution backend epic). Blocked by: #673 (PtyBackend), #676 (xterm.js), #677 (CLI integration).
Final integration issue: wire up backend selection in the orchestrator, update configuration, and document the feature.
Problem
The orchestrator's
main.rscurrently selects backend viaAGENTD_BACKENDenv var with two options:tmux(default) anddocker. This needs to supportptyas a third option, with proper configuration, validation, and documentation.Changes
1. Orchestrator Backend Selection
In
crates/orchestrator/src/main.rs, extend the backend match:2. Wrap Service Backend Selection
The standalone wrap service (
crates/wrap/src/main.rs) currently only usesTmuxManagerdirectly in its API handlers. It should also support backend selection for consistency.3. Configuration Documentation
Document the three backends with their trade-offs:
tmuxdockerpty4. Feature Detection
Add a capability endpoint so clients can discover what the active backend supports:
{ "backend": "pty", "capabilities": { "terminal_streaming": true, "health_check": true, "resource_limits": false, "network_policy": false, "interactive": true } }The UI and CLI use this to show/hide features (e.g., Terminal tab only shown when
terminal_streaming: true).Implementation Steps
ptyoption to backend selection incrates/orchestrator/src/main.rsinfocommand to display capabilitiesRelevant Files
crates/orchestrator/src/main.rs— backend selectioncrates/orchestrator/src/api.rs— API routescrates/wrap/src/main.rs— wrap service entry pointcrates/wrap/src/api.rs— wrap API handlersui/src/components/agents/AgentTerminal.tsx— capability check before renderAcceptance Criteria
AGENTD_BACKEND=ptycorrectly initializes PtyBackend in orchestratoragent wrap infoCaution
All work for this issue must branch from
feature/autonomous-pipelineand PR back into it — never directly tomain.