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: add ACP session runtime and transcripts by hugodutka · Pull Request #30835 · coder/coder

Conversation

@hugodutka

@hugodutka hugodutka commented Oct 15, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Create and run agent-local ACP sessions with configurable harnesses, prompt submission, interruption, and ordered transcripts. Track session status and failures, scope permission grants to running turns, and stop session processes when the manager shuts down.

Tests are in the next PR in the stack.

Depends on #31128.

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 15, 2026
@hugodutka
hugodutka added this pull request to stack #30836 October 15, 2026 11:06
@hugodutka
hugodutka removed this pull request from stack #30836 October 15, 2026 13:08
@hugodutka
hugodutka added this pull request to stack #30843 October 15, 2026 13:08
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 184e24c to 0c2622c Compare October 15, 2026 15:48
@hugodutka
hugodutka removed this pull request from stack #30843 October 15, 2026 15:50
@hugodutka
hugodutka added this pull request to stack #30859 October 15, 2026 16:13
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 0c2622c to 7f87146 Compare October 15, 2026 17:31
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 7f87146 to 91eda3a Compare October 16, 2026 15:19
@hugodutka
hugodutka removed this pull request from stack #30859 October 16, 2026 15:20
@hugodutka
hugodutka added this pull request to stack #30904 October 16, 2026 15:21
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch 3 times, most recently from 998ba37 to 96d1b2e 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-runtime branch 2 times, most recently from 7f5886e to e2dc8a6 Compare October 20, 2026 15:58
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch 2 times, most recently from 7fdd5d7 to c9df05b 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-runtime branch 5 times, most recently from 4eb4426 to 5a06a9d Compare October 20, 2026 19:01
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch 5 times, most recently from d062169 to 6ca2e11 Compare October 21, 2026 13:36
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 6ca2e11 to 16838d9 Compare October 21, 2026 13:49
Base automatically changed from hugodutka/acp-subagents-discovery to main October 21, 2026 14:18
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch 2 times, most recently from 4c592d3 to 35d1c89 Compare October 21, 2026 14:21
@hugodutka
hugodutka changed the base branch from main to hugodutka/acp-fix-anyof-validation October 21, 2026 14:22
@hugodutka hugodutka mentioned this pull request Oct 21, 2026
test(agent/x/agentacp): cover session runtime and transcripts #30841
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:34
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 35d1c89 to 881d061 Compare October 21, 2026 16:56
@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_init.go Outdated
HarnessDisplayName: cfg.displayName,
Status: workspacesdk.ACPSessionStatusInitializing,
Cursor: workspacesdk.ACPCursor{
Epoch: uuid.New(),

@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.

Is this official ACP spec? Feels weird to have an epoch with UUID.

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.

No, this is for our own use. We need ids for turns that are unique even across workspace agent restarts.

Sorry, something went wrong.

Uh oh!

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

All reactions

@mafredri mafredri Oct 23, 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.

How about GenerationID instead of Epoch? I feel like epoch carries the wrong connotation.

Sorry, something went wrong.

Uh oh!

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

hugodutka reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@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.

I'll do that

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/x/agentacp/session_init.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/session_init.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/manager.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/session.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/session.go
}

func (s *SessionFSM) updateStatusLocked(operation sessionOperation) error {
target, ok := sessionTransitions[s.info.Status][operation]

@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.

If we enter error state (s.info.Status), the map above has no recovery path. So any consecutive Message would return !ok here? Oversight or intentional? Don't harnesses produce recoverable error states too? I don't know what classifies, but e.g. "over limit" or "model overloaded" are both recoverable states. Don't know if they'd produce error though.

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.

Intentional. A later PR introduces recovery.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/x/agentacp/session.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/session.go Resolved

Uh oh!

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

Comment thread agent/x/agentacp/session_client.go
// replaces permissionCtx, allowing an interrupted turn's request. The SDK
// dispatches callbacks asynchronously without turn identity, so capturing the
// context before locking cannot reliably bind it to the original turn.
// We'd need a change in the SDK to resolve this.

@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.

Sounds like this TODO shouldn't be deferred?

Sorry, something went wrong.

Uh oh!

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

All reactions

@hugodutka hugodutka Oct 22, 2026 •
edited
Loading

Uh oh!

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

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.

I don't think deferring this is a problem. We approve all requests automatically. The ACP spec says that if a turn gets interrupted then we must send a "cancelled" response instead of "approved" for the requests sent during that turn. So the problem here is that we now have a small race condition: if you interrupt a turn, then right away start a new turn, and then get a late permission request, we'll send "approved" instead of "cancelled". I don't know what the consequences of doing that would be, but I don't think it's worth handling right now. The race window is really hard to hit.

Sorry, something went wrong.

Uh oh!

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

All reactions

@mafredri mafredri Oct 23, 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.

Sounds reasonable to defer, thanks for creating the ticket. This behavior and our SDK piqued my curiosity so I dug into it a bit with my agent and had it write comments on these tickets with a suggestion for a slightly adjusted approach.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/x/agentacp/process.go
var message struct {
Method string `json:"method"`
}
if json.Unmarshal(raw, &message) == nil && message.Method != "" {

@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.

Since the timer is still running, we may end up closing after a successful write while doing this post-processing.

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.

Fixed.

Sorry, something went wrong.

Uh oh!

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

mafredri reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch 2 times, most recently from cb403d2 to 7082100 Compare October 23, 2026 11:14
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from 7082100 to d4e261a 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.

Pre-approving for when the 3 remaining issues are fixed.

Sorry, something went wrong.

Uh oh!

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

All reactions
@hugodutka
feat: create and run agent-local ACP sessions
07fdbd3
Create dedicated harness sessions and keep their operations, status, and
transcripts in a session runtime. Attach callbacks during initialization,
retain ordered output, support cancellation and event watching, and close
manager-owned processes on shutdown. Unknown sessions return not found.

Runtime and lifecycle tests follow in the next change. Restoration and
agent API transport are separate changes.
@hugodutka
hugodutka force-pushed the hugodutka/acp-session-runtime branch from d4e261a to 07fdbd3 Compare October 26, 2026 16:01
@hugodutka
hugodutka merged commit 43ec0ba into main Oct 26, 2026
32 of 52 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-runtime 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.