docs: add agent shutdown and timeout diagnosing guide#31
Open
dbroeglin wants to merge 2 commits into
Open
Conversation
Add docs/diagnosing-agent-shutdowns.md capturing the 600s waitForPendingBackgroundTasks investigation: no turn limit exists, the 600s is a shutdown ceiling (not a measured hang), how to run a gap analysis to tell a real hang from ordinary activity, a proxy-vs-activity signature table, the worked OPA go-test example, and remediation with verified env/extra_args injection points. Link it from the README docs index and cross-reference it from collecting-run-data.md. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
While investigating a DeepSWE OPA trajectory that "stopped at 95 turns" and failed, the symptoms were easy to misread: the run looked like it hung on a single command for 600s, which is the same signature you'd expect from a proxy or network stall. The real cause was the agent repeatedly running the full
go test ./...suite, with the 600swaitForPendingBackgroundTasksacting as a configured shutdown ceiling rather than a measured hang. This doc captures that investigation so the next person can triage a stalled or shut-down agent quickly instead of re-deriving it.What this adds
docs/diagnosing-agent-shutdowns.md- a triage guide covering:waitForPendingBackgroundTasksis a shutdown ceiling, not proof of a hang.go test ./...example plus remediation: prefer targeted tests, then theCOPILOT_TASK_WAIT_TIMEOUT_SECONDSenv knob, then allowlisting a host.env/extra_argsinjection points in the Pier agent.docs/collecting-run-data.mdnext to the aborted-sessions limitation.Notes for reviewers
ruff check .is clean and the fullpytestsuite passes (188 tests).origin/mainto stay current, so the net PR diff is just the three documentation files (+195 / -1).