Skip to content

docs: add agent shutdown and timeout diagnosing guide#31

Open
dbroeglin wants to merge 2 commits into
mainfrom
dbroeglin-document-shutdown-findings
Open

docs: add agent shutdown and timeout diagnosing guide#31
dbroeglin wants to merge 2 commits into
mainfrom
dbroeglin-document-shutdown-findings

Conversation

@dbroeglin

Copy link
Copy Markdown
Owner

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 600s waitForPendingBackgroundTasks acting 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:
    • There is no turn limit; sessions end for other reasons.
    • The 600s waitForPendingBackgroundTasks is a shutdown ceiling, not proof of a hang.
    • A gap-analysis technique (with a Python inter-event-gap snippet) to distinguish a real hang from ordinary long-running work.
    • A proxy-vs-activity signature table to rule out egress-proxy issues.
    • The worked OPA go test ./... example plus remediation: prefer targeted tests, then the COPILOT_TASK_WAIT_TIMEOUT_SECONDS env knob, then allowlisting a host.
    • The verified env / extra_args injection points in the Pier agent.
  • Links the new doc from the README docs index.
  • Cross-references it from docs/collecting-run-data.md next to the aborted-sessions limitation.

Notes for reviewers

  • Docs-only change; no code behavior changes. ruff check . is clean and the full pytest suite passes (188 tests).
  • The branch also merges the latest origin/main to stay current, so the net PR diff is just the three documentation files (+195 / -1).

dbroeglin and others added 2 commits July 9, 2026 14:29
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant