Skip to content

opencode-await

Minimize context window pollution. Transform noisy polling loops into single, deterministic states with automatic log summarization.
agent_session_control.log
Polling Noise
> start_task —id=9
task initiated…
> check_status 9
status: running…
> check_status 9
status: running…
> check_status 9
status: running…
> check_status 9
status: running…
> check_status 9
Wasted Tokens
Clean Session
> await_task
{

“status”: “done”, “result”: “built”, “summary”: ”…”

}
Minimal State
Summarized Output
1000 lines

“summary”: “Build completed successfully with no critical errors.”

💰Perfect for metered AI services that count each message
🧹Keeps session context clean with concise output
🤖Uses free models (like Copilot) for log summarization
opencode.json
{
"plugin": ["opencode-await"]
}

Optimized architecture for reducing noise in autonomous agent loops.

State Determinism

Ensure the environment reaches a complete state before returning control to the agent, eliminating race conditions.

Context Hygiene

Prevent context window overflow by replacing hundreds of polling logs with a single interaction record.

Log Summarization

Automatically condense verbose stdout streams into semantic summaries using lightweight local models.

JSON Enforced

Wrap any CLI tool in a strict JSON schema return type, making parsing 100% reliable for your LLM.