Repository navigation
Description
Task ID: t1306 | Status: open | Estimate: ~4h | Plan: p030
Tags: feature auto-dispatch harness opencode upstream
Description
OpenCode upstream: proof-of-concept PR for stream hooks — fork anomalyco/opencode, implement stream.delta and stream.aborted hooks in streaming loop. Add plugin trigger calls at text-delta, reasoning-delta, and tool-input-delta cases. Implement abort mechanism via AbortController exposure. Add tests. Reference the issue from t1305. NOTE: v1.2.7 migrated from Bun.file() to Filesystem module across entire codebase — fork from latest main, not our stale clone.
Notes
CANCELLED: cancelled by supervisor
Plan: Purpose
Can Boluk's "The Harness Problem" blog post and oh-my-pi codebase (1,300+ commits, fork of Pi) demonstrate that the harness -- the tool layer between model output and workspace changes -- is the highest-leverage place to innovate. His benchmark showed a single edit tool change (hashline) improved 15 models, with Grok Code Fast 1 going from 6.7% to 68.3% success rate. Zero training compute.
Deep analysis of oh-my-pi revealed 10+ patterns applicable to aidevops, ranging from edit tool improvements to real-time streaming policy enforcement (TTSR), observability, and multi-agent orchestration. This plan captures all actionable learnings as concrete implementation tasks.
Plan: Context & Architecture
Context
Key findings from oh-my-pi analysis:
| Pattern | Impact | Feasibility |
|---|---|---|
| TTSR (real-time stream rules) | High -- policy enforcement during generation | Blocked in OpenCode (no stream hooks); needs upstream PR |
| Soft TTSR (system prompt + message transform) | Medium -- preventative enforcement | Available now via unused OpenCode plugin hooks |
| Hashline edit format | High -- 5-14% success improvement, 20-61% token reduction | Custom tooling only (can't replace Claude Code's str_replace) |
| Intent tracing | Medium -- tool-level chain-of-thought for observability | Implementable in OpenCode plugin |
| SQLite observability | High -- cost/performance tracking, budget enforcement | No equivalent exists in aidevops |
| Steering messages | Medium -- user interruption mid-execution | OpenCode architecture question |
| Swarm DAG execution | Medium -- dependency-resolved multi-agent orchestration | Enhances existing supervisor dispatch |
| Blob/artifact storage | Low-medium -- session compactness | Platform-dependent |
| OpenCode plugin hooks we're NOT using yet: |
experimental.chat.system.transform-- transform system prompt before LLM callexperimental.chat.messages.transform-- transform message history before LLM callexperimental.text.complete-- modify completed text parts after generationchat.message-- intercept new user messageschat.params-- modify LLM parametersevent-- receive bus events
OpenCode plugin hooks that DON'T exist (needed for full TTSR):stream.delta-- observe individual streaming tokensstream.aborted-- handle abort with retry/inject capability
Plan: Decision Log
- 2026-02-22: Full TTSR blocked by OpenCode plugin API -- no
stream.deltahook exists. Pursuing soft TTSR (preventative) + upstream contribution for real TTSR. - 2026-02-22: Hashline edit format is valuable but only applicable where we own the full tool chain (headless dispatch, objective runner). Can't replace Claude Code's str_replace.
- 2026-02-22: oh-my-pi cloned to ~/Git/oh-my-pi for ongoing reference. Track upstream changes.
Synced from TODO.md by issue-sync-helper.sh
Activity
101 remaining items
marcusquinn commentedon Feb 24, 2026
Task t1306 reached state: deployed (from complete). No merged PR on record — flagged for human review instead of auto-closing.
marcusquinn commentedon Feb 24, 2026
Task t1306 reached state: verified (from deployed). No merged PR on record — flagged for human review instead of auto-closing.
marcusquinn commentedon Feb 25, 2026
t1306 has status
completein supervisor DB with PR evidence but the issue audit flagged no_pr_linkage. The implementation PR may not be linked to this issue. Needs manual verification: check if the OpenCode upstream PoC was submitted and link the PR here.Posted by AI Supervisor (automated reasoning cycle)
marcusquinn commentedon Feb 25, 2026
Status check: This task (t1306) has been in
needs-reviewfor 3 days withimplemented:opuslabel. PR linkage appears missing from the audit trail (audit flagged issue #2175 for the same task). Please review the implementation PR and either merge or provide feedback to unblock.Posted by AI Supervisor (automated reasoning cycle)
marcusquinn commentedon Feb 25, 2026
Flagged for Human Review
Reason: t1306 (OpenCode upstream PoC) is 3 days old with implemented:opus and needs-review but no approvals on PR. This is an upstream contribution that requires careful review before submission.
This issue has been flagged by the AI supervisor for human review. Please assess and take appropriate action.
Flagged by AI Supervisor (automated reasoning cycle)
marcusquinn commentedon Feb 25, 2026
Status check: t1306 (OpenCode upstream PoC PR) has been in review for 3 days with PR #2130 open (15 comments, 0 approvals). This is an upstream contribution — review timeline depends on the external maintainer. No further supervisor action needed; tracking for staleness.
Posted by AI Supervisor (automated reasoning cycle)
marcusquinn commentedon Feb 25, 2026
This task (t1306: OpenCode upstream PoC) has been in needs-review for 3 days with PR #2130 open. The PR has 16 comments — is there outstanding feedback blocking merge, or is this ready for final review?
Posted by AI Supervisor (automated reasoning cycle)
marcusquinn commentedon Feb 25, 2026
Flagged for Human Review
Reason: t1306 (OpenCode upstream PoC PR) has been open 3 days with 17 comments, dispatched:opus, implemented:opus, needs-review. This is an upstream contribution — review and decide whether to submit the upstream PR or close if the approach isn't viable. 17 comments suggest significant discussion already happened.
This issue has been flagged by the AI supervisor for human review. Please assess and take appropriate action.
Flagged by AI Supervisor (automated reasoning cycle)