Repository navigation
docs: document Agent Relay reaper startup grace and reap delay - #31984
Merged
Merged
Conversation
Agent Relay v0.15.0 makes the reaper's 15-minute startup window configurable (coder/agent-relay#152) and adds a reap delay (coder/agent-relay#134).
…ttings Atif found the reaper options hard to tell apart. Describe what the reaper does in Workspace lifecycle, add a table of which cleanup setting to change for which goal, and say when to use each option. Drop the per-option version notes in favor of the latest release.
Review feedback on #31835 found the reaper docs hard to tell apart and the reap delay wording ambiguous. The delay counts from the latest build's completion, not from the worker's exit, so the earlier wording promised retention for long sessions that the reaper doesn't give. Contrast the startup grace and the reap delay at the top of the reaper reference, state when the delay starts and which outcomes it holds, define the delayed verdict as a wait before delete or failed, and describe the 30-second gap between sweeps exactly. Refs DOCS-1171
nickvigilante
force-pushed
the
docs/agent-relay-reaper-timing
branch
from
November 12, 2026 14:56
3e869c0 to
287e78f
Compare
This was referenced Nov 12, 2026
matifali
approved these changes
Nov 12, 2026
BobbyHo
approved these changes
Nov 12, 2026
BobbyHo
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, left a minor, non-blocking comment.
Clarify the impact of `dispatch_deadline` on a workspace Co-authored-by: Bobby Ho <bobby@coder.com>
Contributor
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
dluman
approved these changes
Nov 12, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Agent Relay v0.15.0 made the reaper's 15-minute startup window configurable (agent-relay#152) and added a reap delay (agent-relay#134).
configuration.md: add--reap-startup-grace(HelmreapStartupGrace) and--reap-delay, plus the per-poolreap_delayfield, under an intro that says how the two options differ. The Cursordispatch_deadline: 0row now points at the startup grace.setup.md: fix the script-ordering note and Workspace lifecycle, which hardcoded 15 minutes and said failed builds are deleted "on the next sweep". Workspace lifecycle now states the 30-second gap between sweeps, and Choose cleanup settings maps each goal to its setting.cursor.md: fix the Build deadline bullet and thependinglifecycle row.troubleshooting.md: the "session ended but its workspace remains" row mentions the reap delay.monitoring/index.md: add thedelayedverdict toagent_relay_reaper_verdicts_totaland define it as a wait beforedeleteorfailed.Verification notes:
reapDelayvalue at v0.15.0 (onlyreapStartupGrace; checkedvalues.yamlandtemplates/_helpers.tpl), so the docs say to setCODER_AGENT_RELAY_REAP_DELAYthroughextraEnv.max(grace, dispatch_deadline). A finished build whose runner reportspendingor nothing fails after the grace alone (workspacereaper/lifecycle.go).Job.CompletedAt, not from the worker's exit, so a session that ran longer than the delay gets no extra time (reapDeadlineinworkspacereaper/reaper.go).delayedis only a metric label. A sweep records it when the verdict isdeleteorfailedbut the delay hasn't passed. TheVerdicttype has onlykeep,delete,failed, andstuck.sweepLoopinservicereaper/reaper.go).Stack 2/6. Review and merge in order:
Refs DOCS-1171