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 idempotent start tokens to the workspace agent process API by ibetitsmike · Pull Request #27322 · coder/coder

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Jul 17, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

Adds idempotent start tokens to the workspace agent process API: a client-supplied opaque token makes process starts exactly-once per token and addressable by token.

Part 6/9 of the CODAGT-757 execution ledger stack (base: #5). Agent and SDK surface only; chatd adopts it in the next two PRs. Supersedes the agent portion of #27102.

Changes

  • StartProcessRequest.ClientToken: the manager reserves the token before spawning, echoes it on the response, and returns the existing process (env-matched) for a duplicate token instead of starting a second process. Concurrent same-token starts collapse to one spawn; waiters honor cancellation and unblock on close.
  • GET /api/v0/processes/tokens/{token}: token probe returning the process (or pending reservation) owning a token.
  • Token index lifecycle: reaped with exited processes on the 60-minute horizon; tokenIndexAge exposes staleness so callers can decide whether an absent token is trustworthy.
  • workspacesdk: ProcessByToken on AgentConn, ProbeProcessToken helper, mock support.

This PR was authored by Mux, an AI coding agent, on Mike's behalf. The stack recomposes the previously reviewed #27100/#27102/#27103 into reviewable pieces, plus fixes from subsequent review rounds.

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@linear-code

linear-code Bot commented Jul 17, 2026

Copy link
Copy Markdown

CODAGT-757

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot assigned ibetitsmike Jul 17, 2026
This was referenced Jul 17, 2026
feat(coderd): track chat execute tool calls in a durable execution ledger #27100
Closed
feat: add idempotent start tokens to the workspace agent process API #27102
Closed
fix(coderd/x/chatd): keep task attempts alive while execute tools make progress #27103
Closed
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 17, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6efe588c7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread codersdk/workspacesdk/agentconn.go Resolved

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from ae1b741 to 9bb2557 Compare July 17, 2026 18:59
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 6efe588 to 1997ba3 Compare July 17, 2026 18:59
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 17, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1997ba3c8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/agentproc/process.go Resolved

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 9bb2557 to 7d87029 Compare July 17, 2026 19:59
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 1997ba3 to 5ecd8f7 Compare July 17, 2026 19:59
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 5ecd8f770f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 7d87029 to 78ace45 Compare July 17, 2026 20:37
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 5ecd8f7 to b6c99b6 Compare July 17, 2026 20:37
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: b6c99b615f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 78ace45 to 8074fdc Compare July 17, 2026 21:48
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from b6c99b6 to 41bd12e Compare July 17, 2026 21:48
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 41bd12e280

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 41bd12e to 85b34db Compare July 17, 2026 22:37
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 8074fdc to 205b452 Compare July 17, 2026 22:37
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 17, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85b34db994

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/agentproc/process.go Resolved

Uh oh!

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

Comment thread codersdk/workspacesdk/agentconn.go Resolved

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 205b452 to c0c96f9 Compare July 17, 2026 23:09
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 85b34db to 58d62d8 Compare July 17, 2026 23:09
@ibetitsmike

ibetitsmike commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 5fcfc6e6cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 5fcfc6e to a66cf97 Compare July 18, 2026 01:38
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from ca25790 to a5c7e47 Compare July 18, 2026 01:38
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: a66cf97400

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from a66cf97 to f011a73 Compare July 18, 2026 01:57
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 18, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f011a738b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/agentproc/process.go Resolved

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from f011a73 to a464f67 Compare July 18, 2026 02:16
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a464f672b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from a5c7e47 to b5c637b Compare July 18, 2026 03:50
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from a464f67 to 44be8b4 Compare July 18, 2026 03:50
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 44be8b4d9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from b5c637b to 06bcf14 Compare July 18, 2026 04:36
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from 44be8b4 to b984e56 Compare July 18, 2026 04:36
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: b984e56635

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 06bcf14 to 8564e68 Compare July 18, 2026 04:57
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from b984e56 to c0c1b86 Compare July 18, 2026 04:57
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 18, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0c1b86e79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread agent/agentproc/process.go Resolved

Uh oh!

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

@ibetitsmike
feat: add idempotent start tokens to the workspace agent process API
c1fcc14
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/05-execution-sweep branch from 8564e68 to 163aad2 Compare July 18, 2026 05:57
@ibetitsmike
ibetitsmike force-pushed the mike/codagt-757/06-agent-start-tokens branch from c0c1b86 to c1fcc14 Compare July 18, 2026 05:57
@ibetitsmike

ibetitsmike commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: c1fcc14aa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike

ibetitsmike commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by a simplified, ledger-free cut of CODAGT-757: #27369, #27370, #27371, #27372.

The new stack drops the database execution ledger entirely and instead relies on agent-side idempotent start tokens with at-least-once semantics: replays attach to the original process when the agent still knows the token, and re-run otherwise. The branches of this stack are kept as the salvage reference until the new stack merges.

This comment was written by Mux, an AI coding agent, operating on Mike's behalf.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ibetitsmike ibetitsmike closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

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

Assignees

@ibetitsmike ibetitsmike

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

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