GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): let a console watch keep waking an unattended session by adamdotdevin · Pull Request #64895 · anomalyco/opencode

Conversation

@adamdotdevin

@adamdotdevin adamdotdevin commented Nov 19, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an optional unattended flag to console_watch.watch. Updates from a watch made with it keep waking the session past the 20-since-the-last-prompt cap, but never more than 5 in 10 minutes, so the window still guards against loops.

Why: a session whose job is to keep handling a stream, such as one that routes Slack mentions to other sessions all day, hits 20 wakes in an hour or two and then holds everything until a person writes. In practice that held 49 mentions for about 10 hours.

The flag is client-side wake policy, so it isn't sent to Console. The plugin marks the watch ID in its storage, and wake() skips the 20 check when every event in the batch comes from a marked watch. On an unattended watch, CI updates also count toward the 10-minute window, so no unattended watch is left without a cap.

How did you verify your code works?

bun run test test/plugin/provider-opencode-watches.test.ts in packages/core: 38 pass. Two new tests cover an unattended watch resuming for 25 updates while an ordinary watch in the same session is held at 20 (and the Console request not carrying the flag), and an unattended watch's sixth update in 10 minutes being held, including a CI update. Each test fails with its half of the change removed.

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Public API: adds an optional unattended input to the console_watch.watch tool (backwards compatible)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adamdotdevin
feat(core): let a Console watch keep waking an unattended session pas…
f838bd3
…t 20 since the prompt
@adamdotdevin
adamdotdevin requested a review from rekram1-node November 19, 2026 15:15
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks sound. I checked it with the plugin's watch tests (38 pass, including the two new ones exercising the real wake logic against the fake Console) and tsc -b on packages/core (clean). I didn't run it against a live Console.

Public API: the console_watch.watch tool's input gets a new optional unattended boolean. It's backwards compatible, and Console's API is unchanged since the flag stays client-side.

One concern: the watch-unattended:<id> marks are never removed (see inline).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/plugin/provider/opencode-watches.ts
...(input.minutes === undefined ? {} : { minutes: input.minutes }),
})
// Wake policy is the client's, so Console never hears of it; the mark goes quiet with the watch.
if (input.unattended) yield* ctx.storage.set(unattendedKey(watch.id), true)

@opencodejr opencodejr Bot Nov 19, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nothing ever removes this mark. unwatch doesn't, and forget (on session.deleted) clears only the streak. The watch-deleted: marks expire after a retention period, but these build up in plugin storage forever, one per unattended watch. Could unwatch and forget remove it (forget would need the session's watch IDs, or the key could include the session ID so it can be scanned by prefix), or could it get the same retention sweep?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adamdotdevin
adamdotdevin merged commit e090ace into dev Nov 19, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@adamdotdevin
adamdotdevin deleted the watch-unattended branch November 19, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@rekram1-node rekram1-node Awaiting requested review from rekram1-node

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@adamdotdevin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.