Skip to content

t1306: OpenCode upstream — stream hooks proof-of-concept PR complete#2318

Merged
marcusquinn merged 1 commit intomainfrom
feature/t1306
Feb 25, 2026
Merged

t1306: OpenCode upstream — stream hooks proof-of-concept PR complete#2318
marcusquinn merged 1 commit intomainfrom
feature/t1306

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 25, 2026

Summary

  • Marks t1305 and t1306 as complete in TODO.md with upstream PR references
  • Adds task brief (todo/tasks/t1306-brief.md) documenting the implementation

What was done

The upstream proof-of-concept PR for stream.delta and stream.aborted plugin hooks has been submitted and is passing all CI:

  • Upstream PR: anomalyco/opencode#14741 — OPEN, MERGEABLE, 9/9 CI checks pass
  • Upstream issue: anomalyco/opencode#14740 — OPEN
  • Changes: 267 additions across processor.ts (stream hooks + abort handling), plugin/index.ts (type definitions), and stream-hooks.test.ts (11 tests)

Implementation details (in upstream repo)

  • stream.delta hook fires on text-delta, reasoning-delta, and tool-input-delta — plugins can set abort: true to cancel
  • stream.aborted hook fires after abort — plugins can set retry: true with optional injectMessage for corrective context
  • StreamAbortedError class for clean abort signaling with max 3 retry attempts
  • 11 tests covering error class, hook input/output shapes, and retry loop behavior

Why

This unblocks full TTSR (Time-To-Stream Rules) — real-time stream policy enforcement in the aidevops OpenCode plugin. Currently blocked on upstream maintainer review.

Closes #2130

Summary by CodeRabbit

  • Documentation

    • Updated internal project planning and task documentation with status updates and new work items tracked.
  • Chores

    • Added planning documentation for upcoming development initiatives.

Note: This release contains no user-facing changes. Updates are limited to internal project planning and documentation.

Mark t1305 and t1306 as complete — upstream PR anomalyco/opencode#14741
is open with all 9/9 CI checks passing and MERGEABLE status. Add task
brief documenting the implementation, acceptance criteria, and
completion evidence.
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request finalizes the internal tracking and documentation for the upstream proof-of-concept implementation of real-time stream hooks in OpenCode. The completed work enables plugins to interact with streaming events, offering capabilities like early abortion and intelligent retries, which are foundational for advanced features such as Time-To-Stream Rules (TTSR) and real-time policy enforcement.

Highlights

  • Task Completion: Tasks t1305 (proposing stream hooks issue) and t1306 (proof-of-concept PR for stream hooks) have been marked as complete in TODO.md, including references to the upstream PR and issue.
  • New Documentation: A new task brief, todo/tasks/t1306-brief.md, was added to document the implementation details, approach, and acceptance criteria for the t1306 stream hooks proof-of-concept.
  • Upstream Proof-of-Concept PR: The proof-of-concept PR for stream.delta and stream.aborted plugin hooks has been submitted to the upstream anomalyco/opencode repository, passing all 9/9 CI checks and is mergeable.
  • Stream Delta Hook: The stream.delta hook fires on text-delta, reasoning-delta, and tool-input-delta events during streaming, allowing plugins to set abort: true to cancel the stream.
  • Stream Aborted Hook: The stream.aborted hook fires after an abort, enabling plugins to set retry: true with an optional injectMessage for corrective context, with a maximum of 3 retry attempts.
  • Error Handling and Testing: A StreamAbortedError class was introduced for clean abort signaling, and 11 new tests were added to cover the error class, hook input/output shapes, and retry loop behavior.
Changelog
  • TODO.md
    • Updated the completion status for tasks t1305 and t1306.
    • Added pr and upstream-issue/upstream-pr references for t1305 and t1306.
  • todo/tasks/t1306-brief.md
    • Added a new file detailing the t1306 task, including its origin, purpose, implementation approach, acceptance criteria, context, relevant files, dependencies, and completion evidence.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Walkthrough

Updates to TODO.md introduce new upstream OpenCode integration tasks (t1305–t1314), including proof-of-concept stream hooks (t1306), observability instrumentation, verification tooling, and cross-repo coordination. New task brief document (t1306-brief.md) specifies implementation details, acceptance criteria, and completion evidence for the stream hooks proof-of-concept.

Changes

Cohort / File(s) Summary
Task Planning & Organization
TODO.md
Added and updated tasks t1305–t1314 for OpenCode upstream integration; included new streams for observability instrumentation, verification, and cross-repo coordination; consolidated governance tasks with updated status metadata and upstream references.
Task Brief Documentation
todo/tasks/t1306-brief.md
New task brief documenting proof-of-concept PR for OpenCode stream.delta and stream.aborted hooks; specifies implementation scope (plugin hooks, StreamAbortedError, retry logic with max 3 attempts), acceptance criteria, test coverage, and upstream integration details.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

needs-review

Poem

🚀 Tasks crystallize, streams now flow clear—
Hooks await upstream, the harness draws near!
From oh-my-pi's wisdom, five patterns emerge,
t1306 stands ready at observability's verge. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title clearly and specifically identifies task t1306 and its core outcome (proof-of-concept PR completion for OpenCode stream hooks).
Linked Issues check ✅ Passed PR successfully implements all coding requirements from #2130: stream.delta and stream.aborted hooks, AbortController exposure, retry logic, type definitions, and comprehensive test coverage.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #2130: updates to TODO.md tracking task status and a new documentation file (t1306-brief.md) describing the proof-of-concept.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t1306

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 90 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 25 22:46:47 UTC 2026: Code review monitoring started
Wed Feb 25 22:46:47 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 90

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 90
  • VULNERABILITIES: 0

Generated on: Wed Feb 25 22:46:50 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@augmentcode
Copy link

augmentcode bot commented Feb 25, 2026

🤖 Augment PR Summary

Summary: Documents completion of the upstream OpenCode “stream hooks” proof-of-concept work needed to unblock real-time TTSR enforcement.

Changes:

  • Updates TODO.md to mark t1305/t1306 complete and adds references to the upstream issue/PR plus a completion note.
  • Adds todo/tasks/t1306-brief.md capturing the task’s goals, approach, acceptance criteria, and completion evidence.

Technical Notes: This PR is documentation-only in this repo; the functional implementation lives upstream (anomalyco/opencode#14740/#14741).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

My review focuses on ensuring the documentation is consistent and accurate. I've pointed out a factual inconsistency in the TODO.md summary and suggested an addition for clarity in the detailed brief, aligning with guidelines for clear and complete operational details.

- [ ] t1306 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. ~4h #feature #auto-dispatch #harness #opencode #upstream model:opus ref:GH#2130 [proposed:auto-dispatch model:opus] status:deployed
- Notes: CANCELLED: cancelled by supervisor
- [x] t1305 OpenCode upstream: open issue proposing stream.delta + stream.aborted plugin hooks — research existing OpenCode issues for overlap. Draft issue citing oh-my-pi benchmark data (hashline improved 15 models, 5-68% success rate gains, 20-61% token reduction). Propose two new hooks: `stream.delta` (observe individual streaming tokens, return `{abort?: boolean}`) and `stream.aborted` (handle abort with `{retry?: boolean, injectMessage?: string}`). Reference the streaming loop where hooks would be inserted. Include code sketch showing the modest change needed. ~2h #feature #auto-dispatch #harness #opencode #upstream model:opus ref:GH#2129 pr:#2152 completed:2026-02-22 upstream-issue:anomalyco/opencode#14740
- [x] t1306 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. ~4h #feature #auto-dispatch #harness #opencode #upstream model:opus ref:GH#2130 completed:2026-02-25 upstream-pr:anomalyco/opencode#14741

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The task description for t1306 mentions implementing the abort mechanism using AbortController exposure. However, the newly added task brief (todo/tasks/t1306-brief.md) states that a StreamAbortedError custom error class was used instead. To maintain consistency and accurately reflect the work done, it would be best to update the task description in this file.

Suggested change
- [x] t1306 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. ~4h #feature #auto-dispatch #harness #opencode #upstream model:opus ref:GH#2130 completed:2026-02-25 upstream-pr:anomalyco/opencode#14741
- [x] t1306 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 a custom StreamAbortedError. Add tests. Reference the issue from t1305. ~4h #feature #auto-dispatch #harness #opencode #upstream model:opus ref:GH#2130 completed:2026-02-25 upstream-pr:anomalyco/opencode#14741

6. Add tests in `packages/opencode/test/session/stream-hooks.test.ts`

Key files:
- `packages/opencode/src/session/processor.ts` — streaming loop (two locations: reasoning and text delta handlers)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The brief mentions that stream.delta hooks are triggered for text-delta, reasoning-delta, and tool-input-delta. However, this line only lists "reasoning and text delta handlers" as key locations. For clarity and consistency, it would be good to include tool-input-delta here as well.

Suggested change
- `packages/opencode/src/session/processor.ts` — streaming loop (two locations: reasoning and text delta handlers)
- `packages/opencode/src/session/processor.ts` — streaming loop (handlers for text-delta, reasoning-delta, and tool-input-delta)
References
  1. Ensuring all relevant operational details, such as delta handlers, are explicitly listed for clarity and consistency, especially when presented in a bulleted format.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
todo/tasks/t1306-brief.md (4)

87-87: Document a staleness-prevention step for future upstream contributions.

Two PRs were closed due to a stale base before the v2 rebase succeeded. The brief notes the incident but doesn't record a guard against repeating it. A one-liner here would help future task authors:

 - **v2 branch**: First attempt (`feature/stream-hooks`, PR `#14701/`#14727) was closed due to stale base. Rebased onto latest dev as `feature/stream-hooks-v2` (PR `#14741`).
+- **Staleness guard**: For future upstream PRs, run `git fetch upstream && git rebase upstream/dev` and force-push before opening — or set a calendar reminder to rebase after >3 days without merge.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@todo/tasks/t1306-brief.md` at line 87, Add a one-line guard to the brief
advising to update the PR base before long-lived rebases: mention the branch
names `feature/stream-hooks` and `feature/stream-hooks-v2` (and optionally PR
`#14701/`#14727/#14741) and instruct future authors to rebase onto the latest
`dev` and verify CI and mergeability immediately before leaving the PR open to
prevent stale-base closures.

43-81: All acceptance criteria are manual-only — add automated verification scripts.

Every criterion here delegates to a human eyeballing a PR diff or running gh pr checks once. For a DevOps harness claiming zero technical debt and A-grade tooling, this creates a silent regression risk: if the upstream PR is amended, force-pushed, or superseded, none of these checks will fire.

At a minimum, add a companion verify.sh (or inline it under each criterion) that does the real work:

- verify:
-   method: manual
-   prompt: "gh pr checks 14741 --repo anomalyco/opencode — all 9 checks SUCCESS"
+ verify:
+   method: script
+   script: |
+     gh pr checks 14741 --repo anomalyco/opencode \
+       | awk '{print $2}' \
+       | grep -v "^pass$" \
+       && echo "FAIL: some checks did not pass" && exit 1 \
+       || echo "OK: all checks pass"

The same pattern applies to the diff-inspection criteria — gh pr diff 14741 --repo anomalyco/opencode | grep is automatable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@todo/tasks/t1306-brief.md` around lines 43 - 81, Replace the manual-only
verification steps in todo/tasks/t1306-brief.md with automated checks by adding
a verify.sh script and wiring each YAML criterion to call it (or inlining the
commands) — script should run `gh pr diff 14741 --repo anomalyco/opencode |
grep` for the Plugin.trigger and Hooks type diffs, `gh pr checks 14741 --repo
anomalyco/opencode` for CI status, and run the test suite (e.g., npm/yarn test
or the repository’s test command) to assert passing tests and StreamAbortedError
coverage; update the YAML verify blocks to invoke the script/commands and fail
nonzero on mismatches so CI can catch regressions.

89-89: STREAM_ABORT_MAX_RETRIES = 3 is not plugin-configurable — note as a design limitation.

If stream.aborted is meant to be a general-purpose plugin hook, hardwiring the retry budget to 3 means every plugin shares that ceiling regardless of its use case. Cost-control plugins may want a budget of 1; resilience plugins may need more. Since this is upstream-bound code, changing it later is a breaking change.

Either justify 3 as a deliberate safe default in the brief (and link a follow-up to expose maxRetries in the hook output type), or document this explicitly as a known limitation so downstream TTSR consumers aren't surprised.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@todo/tasks/t1306-brief.md` at line 89, The brief currently presents
STREAM_ABORT_MAX_RETRIES = 3 as a hardcoded constant but does not call out that
this retry budget is not plugin-configurable; update the task brief to either
(a) justify 3 as a deliberate safe default and add a follow-up note to expose a
maxRetries field in the stream.aborted hook output type, or (b) explicitly
document this as a known design limitation so downstream consumers are warned
that plugins cannot change retry budget (reference STREAM_ABORT_MAX_RETRIES and
stream.aborted in the text). Ensure the brief includes the chosen path and a
linked follow-up issue for exposing maxRetries if you pick (a).

90-90: Track the (value as any) type assertions as follow-up debt.

The brief documents the any cast as a deliberate workaround, but there's no linked issue or follow-up task to resolve it when the upstream SDK ships proper types for tool-input-delta. Without a tracked item, this silently stays any indefinitely — which is exactly the kind of debt this harness claims to avoid.

Consider adding a Blocks: or Follow-up: entry referencing a new task (e.g., t1315: upstream SDK types PR for tool-input-delta fields) so the cast gets revisited when upstream types land.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@todo/tasks/t1306-brief.md` at line 90, Add a tracked follow-up task and
reference it in the brief so the temporary any casts used for tool-input-delta
fields are not forgotten: create a task like "t1315: upstream SDK types PR for
tool-input-delta fields" and add a "Blocks:" or "Follow-up:" line in the brief
that mentions that task and the specific workaround locations (the `(value as
any).id` and `(value as any).delta` casts) so reviewers can find and remove the
casts once upstream exposes proper types.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@todo/tasks/t1306-brief.md`:
- Around line 115-120: Rename the "## Completion Evidence" header to "##
Delivery Evidence" in todo/tasks/t1306-brief.md, update the paragraph that lists
the upstream PR anomalyco/opencode#14741 to explicitly state that the PR is OPEN
and that delivery is pending upstream merge (e.g., "Upstream PR is open;
delivery is pending maintainer merge — re-engage if PR is closed or requests
rework"), and add a follow-up task entry (suggested id: t1315) that tracks the
upstream merge of anomalyco/opencode#14741 so the task can be closed only after
the PR is merged.

---

Nitpick comments:
In `@todo/tasks/t1306-brief.md`:
- Line 87: Add a one-line guard to the brief advising to update the PR base
before long-lived rebases: mention the branch names `feature/stream-hooks` and
`feature/stream-hooks-v2` (and optionally PR `#14701/`#14727/#14741) and instruct
future authors to rebase onto the latest `dev` and verify CI and mergeability
immediately before leaving the PR open to prevent stale-base closures.
- Around line 43-81: Replace the manual-only verification steps in
todo/tasks/t1306-brief.md with automated checks by adding a verify.sh script and
wiring each YAML criterion to call it (or inlining the commands) — script should
run `gh pr diff 14741 --repo anomalyco/opencode | grep` for the Plugin.trigger
and Hooks type diffs, `gh pr checks 14741 --repo anomalyco/opencode` for CI
status, and run the test suite (e.g., npm/yarn test or the repository’s test
command) to assert passing tests and StreamAbortedError coverage; update the
YAML verify blocks to invoke the script/commands and fail nonzero on mismatches
so CI can catch regressions.
- Line 89: The brief currently presents STREAM_ABORT_MAX_RETRIES = 3 as a
hardcoded constant but does not call out that this retry budget is not
plugin-configurable; update the task brief to either (a) justify 3 as a
deliberate safe default and add a follow-up note to expose a maxRetries field in
the stream.aborted hook output type, or (b) explicitly document this as a known
design limitation so downstream consumers are warned that plugins cannot change
retry budget (reference STREAM_ABORT_MAX_RETRIES and stream.aborted in the
text). Ensure the brief includes the chosen path and a linked follow-up issue
for exposing maxRetries if you pick (a).
- Line 90: Add a tracked follow-up task and reference it in the brief so the
temporary any casts used for tool-input-delta fields are not forgotten: create a
task like "t1315: upstream SDK types PR for tool-input-delta fields" and add a
"Blocks:" or "Follow-up:" line in the brief that mentions that task and the
specific workaround locations (the `(value as any).id` and `(value as
any).delta` casts) so reviewers can find and remove the casts once upstream
exposes proper types.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98c175d and 368145c.

📒 Files selected for processing (2)
  • TODO.md
  • todo/tasks/t1306-brief.md

Comment on lines +115 to +120
## Completion Evidence

- **Upstream PR:** [anomalyco/opencode#14741](https://github.com/anomalyco/opencode/pull/14741) — OPEN, MERGEABLE, 9/9 CI checks pass
- **Upstream issue:** [anomalyco/opencode#14740](https://github.com/anomalyco/opencode/issues/14740) — OPEN
- **Changes:** 267 additions, 2 deletions across 3 files
- **Tests:** 11 new tests in `stream-hooks.test.ts` + all 120 existing session tests pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Completion evidence references an OPEN PR — clarify the task completion boundary.

The brief marks all checkboxes [x] and the task is listed as done, but the upstream PR is still OPEN and awaiting maintainer review. "Delivery complete" ≠ "merged and shipped." If the upstream maintainer requests significant rework or closes the PR, this task needs to be re-engaged.

Recommend rephrasing the section header from ## Completion Evidence to ## Delivery Evidence and adding an explicit note:

+> ⚠️ Merge is pending upstream maintainer review. Task status reflects delivery of the PoC PR, not upstream adoption.
 - **Upstream PR:** [anomalyco/opencode#14741](https://github.com/anomalyco/opencode/pull/14741) — OPEN, MERGEABLE, 9/9 CI checks pass

Also consider adding a follow-up task (e.g., t1315: track upstream merge of anomalyco/opencode#14741) to close the loop.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Completion Evidence
- **Upstream PR:** [anomalyco/opencode#14741](https://github.com/anomalyco/opencode/pull/14741) — OPEN, MERGEABLE, 9/9 CI checks pass
- **Upstream issue:** [anomalyco/opencode#14740](https://github.com/anomalyco/opencode/issues/14740) — OPEN
- **Changes:** 267 additions, 2 deletions across 3 files
- **Tests:** 11 new tests in `stream-hooks.test.ts` + all 120 existing session tests pass
## Completion Evidence
> ⚠️ Merge is pending upstream maintainer review. Task status reflects delivery of the PoC PR, not upstream adoption.
- **Upstream PR:** [anomalyco/opencode#14741](https://github.com/anomalyco/opencode/pull/14741) — OPEN, MERGEABLE, 9/9 CI checks pass
- **Upstream issue:** [anomalyco/opencode#14740](https://github.com/anomalyco/opencode/issues/14740) — OPEN
- **Changes:** 267 additions, 2 deletions across 3 files
- **Tests:** 11 new tests in `stream-hooks.test.ts` + all 120 existing session tests pass
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@todo/tasks/t1306-brief.md` around lines 115 - 120, Rename the "## Completion
Evidence" header to "## Delivery Evidence" in todo/tasks/t1306-brief.md, update
the paragraph that lists the upstream PR anomalyco/opencode#14741 to explicitly
state that the PR is OPEN and that delivery is pending upstream merge (e.g.,
"Upstream PR is open; delivery is pending maintainer merge — re-engage if PR is
closed or requests rework"), and add a follow-up task entry (suggested id:
t1315) that tracks the upstream merge of anomalyco/opencode#14741 so the task
can be closed only after the PR is merged.

@marcusquinn marcusquinn merged commit 3d30c1b into main Feb 25, 2026
20 of 23 checks passed
alex-solovyev pushed a commit that referenced this pull request Feb 26, 2026
Mark t1305 and t1306 as complete — upstream PR anomalyco/opencode#14741
is open with all 9/9 CI checks passing and MERGEABLE status. Add task
brief documenting the implementation, acceptance criteria, and
completion evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t1306: OpenCode upstream: proof-of-concept PR for stream hooks

1 participant