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: watch and subscribe to ACP session updates by hugodutka · Pull Request #30903 · coder/coder

Conversation

@hugodutka

@hugodutka hugodutka commented Oct 16, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Add atomic transcript snapshots and live event subscriptions for agent-local ACP sessions, with cursor-based replay across turns. Close subscriptions on cancellation, shutdown, or buffer overflow so slow consumers do not block session updates.

Depends on #30841.

Generated with Codex, carefully reviewed by Hugo.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-actions github-actions Bot assigned hugodutka Oct 16, 2026
@hugodutka
hugodutka added this pull request to stack #30904 October 16, 2026 15:21
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 9af709a to f05ab0e Compare October 16, 2026 17:01
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from f05ab0e to bd28aaa Compare October 19, 2026 12:06
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from bd28aaa to af6a9ef Compare October 19, 2026 12:58
@hugodutka
hugodutka removed this pull request from stack #30904 October 19, 2026 14:05
@hugodutka
hugodutka added this pull request to stack #31024 October 19, 2026 14:05
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from af6a9ef to 5c399b0 Compare October 20, 2026 15:23
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch 2 times, most recently from 3c8f0a2 to 95c08cc Compare October 20, 2026 17:25
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 95c08cc to 02d0db9 Compare October 20, 2026 17:51
@hugodutka
hugodutka removed this pull request from stack #31024 October 20, 2026 17:52
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch 2 times, most recently from 2d9161d to 7ffb76c Compare October 20, 2026 18:35
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch 2 times, most recently from 0eafcb2 to 62c8378 Compare October 20, 2026 18:53
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 62c8378 to 62ec300 Compare October 20, 2026 19:01
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 62ec300 to b265426 Compare October 20, 2026 19:07
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from a7d3693 to d514a37 Compare October 21, 2026 13:49
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from d514a37 to b506887 Compare October 21, 2026 14:19
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch 2 times, most recently from 52080a0 to 1170d50 Compare October 21, 2026 16:12
@hugodutka hugodutka mentioned this pull request Oct 21, 2026
feat: restore and recover agent-local ACP sessions #30857
Merged
@hugodutka
hugodutka added this pull request to stack #31131 October 21, 2026 16:34
@hugodutka
hugodutka marked this pull request as ready for review October 21, 2026 16:36
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 1170d50 to e43d28d Compare October 21, 2026 16:56
@hugodutka hugodutka changed the title feat(agent/x/agentacp): watch and subscribe to session updates feat: watch and subscribe to ACP session updates Oct 21, 2026
@mafredri
mafredri self-requested a review October 22, 2026 09:44
mafredri
mafredri reviewed Oct 22, 2026
View reviewed changes
Comment thread agent/x/agentacp/session.go
return r, nil, err
}
subscriber := &sessionSubscriber{
events: make(chan workspacesdk.ACPEvent, 64),

@mafredri mafredri Oct 22, 2026

Copy link
Copy Markdown
Member

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.

I'd like to avoid these pre-determined buffered channels that have unpredictable results. We already have a case in chatd where live streaming just halts because a channel becomes full. Leaving this as-is, there'd have to be a case for why 64 will never overflow, or why it's OK when it does. Ideally this would be a slice or an unbounded channel (e.g. slice-backed). Memory consumption may be a concern, although I find that unlikely.

Sorry, something went wrong.

Uh oh!

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

All reactions

@hugodutka hugodutka Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

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.

Here the result is very predictable. If the subscriber lets the buffer overflow we remove it. This is a pretty standard pattern.

Sorry, something went wrong.

Uh oh!

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

All reactions

@mafredri mafredri Oct 22, 2026

Copy link
Copy Markdown
Member

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.

And what happens after it’s removed? Would like to see the reasoning encoded in the code.

Sorry, something went wrong.

Uh oh!

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

All reactions

@hugodutka hugodutka Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

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.

Added a comment to explain it.

Sorry, something went wrong.

Uh oh!

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

All reactions

@hugodutka hugodutka Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

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.

Follow up issue: https://linear.app/codercom/issue/CODAGT-1468/improve-performancestability-of-the-acp-watch-functionality-under-high

Sorry, something went wrong.

Uh oh!

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

All reactions
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from e43d28d to 152b431 Compare October 22, 2026 20:31
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch 3 times, most recently from cb95a04 to 66866e8 Compare October 23, 2026 11:34
mafredri
mafredri approved these changes Oct 26, 2026
View reviewed changes

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

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.

Approving as-is with the caveat that it would be nice to clean up the subscriber implementation as a follow-up to be mutex or unbounded channel based.

Sorry, something went wrong.

Uh oh!

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

All reactions
@hugodutka
feat(agent/x/agentacp): watch and subscribe to session updates
28c97ff
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-watch branch from 66866e8 to 28c97ff Compare October 26, 2026 16:01
@hugodutka
hugodutka merged commit d2c32e6 into main Oct 26, 2026
27 checks passed

Uh oh!

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

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
@hugodutka
hugodutka deleted the hugodutka/acp-session-watch branch October 26, 2026 16:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@mafredri mafredri mafredri approved these changes

Uh oh!

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

Assignees

@hugodutka hugodutka

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.

2 participants

@hugodutka @mafredri
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 01402503 — 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.