Environment
@aoagents/ao 0.9.2
- Agent runtime: opencode, configured as the orchestrator agent
- Model: deepseek (via opencode
--model)
- OS: Linux (WSL2); tmux runtime
Summary
When opencode is configured as the orchestrator agent, AO never delivers a turn to it:
- On spawn the opencode session starts empty (
messages: [], 0 input tokens) — no kickoff turn, so the orchestrator never starts its loop.
ao send <orchestrator> "..." reports success but the message never appears in the opencode session.
The orchestrator prompt itself is delivered (written to workspace AGENTS.md) and is proven loaded — but with no turn ever submitted, the agent just sits idle.
Steps to reproduce
- Configure the orchestrator with
agent: opencode (+ a model).
- Start AO and let it spawn the orchestrator.
- Inspect/export the opencode session → empty, 0 input tokens.
ao send <orchestrator-session> "ping" → AO reports sent; re-inspect → still empty.
Expected
- Orchestrator receives a kickoff turn on spawn and begins its loop.
ao send delivers a user turn that appears in the opencode session.
Actual
- Empty session on spawn;
ao send silently no-ops.
Evidence / likely root cause
Two independent gaps, both pointing at the same missing capability — AO has no working "inject a user turn" primitive for an attached opencode TUI session:
-
Bootstrap (no kickoff turn). ao-plugin-agent-opencode/dist/index.js injects a turn only when config.prompt is set (--prompt on the resumed opencode --session …). It does not read config.systemPromptFile. For the orchestrator, AO delivers the prompt via AGENTS.md / systemPromptFile, not config.prompt, so the launch command injects no turn.
-
Send. ao send ends up on the generic runtime transport (tmux paste-buffer + send-keys into the pane running the full-screen opencode --session TUI). The opencode TUI does not consume the pasted buffer as a submitted turn, so nothing lands. The opencode agent plugin defines no sendMessage / turn-injection method of its own.
The native path works. opencode run --session <id> --model <model> "<msg>" delivers reliably — the message lands and the model responds (verified: session input jumped to ~20.7k tokens once a turn was submitted this way). So the session and the AGENTS.md prompt context are fine; only AO's delivery transport is at fault.
Suggested fix
Deliver orchestrator/agent turns to opencode via opencode run --session <id> (the native, working path) instead of tmux TUI paste — for both the initial kickoff and ao send. opencode already exposes session state via opencode session list (updated/updatedAt), which AO uses for activity detection, so delivery confirmation still works.
Workaround
A local PATH shim that replaces the interactive opencode --session with a stdin → opencode run --session bridge restores both the kickoff turn and ao send, without patching AO.
Environment
@aoagents/ao0.9.2--model)Summary
When
opencodeis configured as the orchestrator agent, AO never delivers a turn to it:messages: [], 0 input tokens) — no kickoff turn, so the orchestrator never starts its loop.ao send <orchestrator> "..."reports success but the message never appears in the opencode session.The orchestrator prompt itself is delivered (written to workspace
AGENTS.md) and is proven loaded — but with no turn ever submitted, the agent just sits idle.Steps to reproduce
agent: opencode(+ a model).ao send <orchestrator-session> "ping"→ AO reports sent; re-inspect → still empty.Expected
ao senddelivers a user turn that appears in the opencode session.Actual
ao sendsilently no-ops.Evidence / likely root cause
Two independent gaps, both pointing at the same missing capability — AO has no working "inject a user turn" primitive for an attached opencode TUI session:
Bootstrap (no kickoff turn).
ao-plugin-agent-opencode/dist/index.jsinjects a turn only whenconfig.promptis set (--prompton the resumedopencode --session …). It does not readconfig.systemPromptFile. For the orchestrator, AO delivers the prompt viaAGENTS.md/systemPromptFile, notconfig.prompt, so the launch command injects no turn.Send.
ao sendends up on the generic runtime transport (tmuxpaste-buffer+send-keysinto the pane running the full-screenopencode --sessionTUI). The opencode TUI does not consume the pasted buffer as a submitted turn, so nothing lands. The opencode agent plugin defines nosendMessage/ turn-injection method of its own.The native path works.
opencode run --session <id> --model <model> "<msg>"delivers reliably — the message lands and the model responds (verified: session input jumped to ~20.7k tokens once a turn was submitted this way). So the session and theAGENTS.mdprompt context are fine; only AO's delivery transport is at fault.Suggested fix
Deliver orchestrator/agent turns to opencode via
opencode run --session <id>(the native, working path) instead of tmux TUI paste — for both the initial kickoff andao send. opencode already exposes session state viaopencode session list(updated/updatedAt), which AO uses for activity detection, so delivery confirmation still works.Workaround
A local PATH shim that replaces the interactive
opencode --sessionwith astdin → opencode run --sessionbridge restores both the kickoff turn andao send, without patching AO.