From 0506e14f709c255af2b77693055c2556516dd893 Mon Sep 17 00:00:00 2001 From: prql-bot <107324867+prql-bot@users.noreply.github.com> Date: Sun, 24 May 2026 08:51:56 +0000 Subject: [PATCH 1/2] skills(running-tend): warn against background until-loops for `.completed` markers The harness auto-backgrounds commands that exceed their tool timeout and signals completion via task notifications, not via a marker file. Polling for a non-existent `.completed` marker file with run_in_background:true creates an orphan loop that outlives the session and hangs the workflow until the `timeout-minutes` cap. One such occurrence in run 26347739838 burned 5h40m of runner minutes and converted a successful posting into `cancelled`. Upstream fix tracked at max-sixty/tend#594; this overlay is the local stopgap. --- .claude/skills/running-tend/SKILL.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.claude/skills/running-tend/SKILL.md b/.claude/skills/running-tend/SKILL.md index b641c535777f..1121ef159616 100644 --- a/.claude/skills/running-tend/SKILL.md +++ b/.claude/skills/running-tend/SKILL.md @@ -27,6 +27,25 @@ permission first) still applies when the target shows no agent signals. in #5753, so bot PRs must be merged manually by a maintainer (or via repo branch-protection auto-merge if a maintainer enables it on the PR). +## Background tasks + +When a Bash command exceeds its tool timeout, the harness auto-backgrounds it +and the tool result reads `Command running in background with ID: bgXXXX. +Output is being written to: …/bgXXXX.output. You will be notified when it +completes.` The notification arrives as a `` user message +— there is **no `.completed` marker file**, only the `.output` file. + +Do not start a `run_in_background: true` `until [ -f …/bgXXXX.completed ]; do +sleep N; done` loop to wait for it. That loop polls forever (the marker never +appears), and because it's running in background the session can't reap it. +When the session ends, the orphan shell + sleep keep the runner alive until +the workflow's `timeout-minutes` cap, which converts an otherwise successful +run into `cancelled` (see [max-sixty/tend#594](https://github.com/max-sixty/tend/issues/594) +for a 5h40m incident on this repo). + +Instead: continue with other work after the auto-background. The task +notification re-enters the session; act on it then. + ## Weekly maintenance These tasks run as Step 3 of the bundled weekly skill (only when From bafefe61d7f196f9481a1dbda2b778f08308ec5d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 08:52:45 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .claude/skills/running-tend/SKILL.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.claude/skills/running-tend/SKILL.md b/.claude/skills/running-tend/SKILL.md index 1121ef159616..d56871856221 100644 --- a/.claude/skills/running-tend/SKILL.md +++ b/.claude/skills/running-tend/SKILL.md @@ -30,18 +30,19 @@ permission first) still applies when the target shows no agent signals. ## Background tasks When a Bash command exceeds its tool timeout, the harness auto-backgrounds it -and the tool result reads `Command running in background with ID: bgXXXX. -Output is being written to: …/bgXXXX.output. You will be notified when it -completes.` The notification arrives as a `` user message -— there is **no `.completed` marker file**, only the `.output` file. - -Do not start a `run_in_background: true` `until [ -f …/bgXXXX.completed ]; do -sleep N; done` loop to wait for it. That loop polls forever (the marker never -appears), and because it's running in background the session can't reap it. -When the session ends, the orphan shell + sleep keep the runner alive until -the workflow's `timeout-minutes` cap, which converts an otherwise successful -run into `cancelled` (see [max-sixty/tend#594](https://github.com/max-sixty/tend/issues/594) -for a 5h40m incident on this repo). +and the tool result reads +`Command running in background with ID: bgXXXX. Output is being written to: …/bgXXXX.output. You will be notified when it completes.` +The notification arrives as a `` user message — there is **no +`.completed` marker file**, only the `.output` file. + +Do not start a `run_in_background: true` +`until [ -f …/bgXXXX.completed ]; do sleep N; done` loop to wait for it. That +loop polls forever (the marker never appears), and because it's running in +background the session can't reap it. When the session ends, the orphan shell + +sleep keep the runner alive until the workflow's `timeout-minutes` cap, which +converts an otherwise successful run into `cancelled` (see +[max-sixty/tend#594](https://github.com/max-sixty/tend/issues/594) for a 5h40m +incident on this repo). Instead: continue with other work after the auto-background. The task notification re-enters the session; act on it then.