worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

Bot temporarily unavailable

Open worktrunk-bot opened this issue 5 months ago • 19 comments

The bot failed to process a request. This issue tracks failures until the underlying cause is resolved.

When Run Trigger
2026-06-26T20:54:10Z workflow run CI fix for workflow run

This issue was created automatically. Close it once the outage is resolved.

worktrunk-bot avatar Jun 26 '26 20:06 worktrunk-bot

Failed run at 2026-06-27T05:34:40Z: workflow run (triggered by CI fix for workflow run)

worktrunk-bot avatar Jun 27 '26 05:06 worktrunk-bot

Run 28261729192

fix-ci

Claude headless run exceeded 3600s timeout

Run 28278696966

fix-ci

Claude headless run exceeded 3600s timeout

worktrunk-bot avatar Jun 27 '26 07:06 worktrunk-bot

Failed run at 2026-06-27T18:14:44Z: workflow run (triggered by #3133)

worktrunk-bot avatar Jun 27 '26 18:06 worktrunk-bot

@tend-agent please diagnose

max-sixty avatar Jun 27 '26 19:06 max-sixty

Diagnosis: these aren't harness hangs — they're real sessions running out the 60-minute (3600s) cap mid-work.

I pulled the session logs for all three timed-out runs. In every case the agent was actively issuing tool calls right up to the cutoff (245 / ~250 / ~280 assistant turns; 50–91 Bash calls each). The largest gaps between events were ~9.5 min and ~7.5 min — those are CI-monitoring poll loops and full cargo test runs, not indefinite stalls. So nothing is stuck; the work is just genuinely longer than the cap, and the harness correctly reports the timeout as an outage.

Two distinct patterns:

1. The two nightly tend-ci-fix runs are grinding on the same unconverged flaky test. Both run 28261729192 and run 28278696966 spent the whole hour on test_switch_picker_preview_auto_refreshes_when_compute_lands (integration, shell-integration-tests). It's a non-deterministic PTY/preview race — the sessions iterated fix → run 20× → capture failure and got it from ~50% → ~19% → ~5% flaky but never to deterministic green, so nothing was pushed. Each night tend-ci-fix restarts cold on the same open-ended problem and times out again. That's the recurring outage.

2. The tend-mention run lost time to a sibling collision. Run 28296128925 (#3133) was a different task, but a concurrent bot run pushed to the same PR branch mid-session, forcing repeated reset/rebase/re-integrate cycles, then it ran out the clock in a CI-monitoring poll loop.

Suggested fixes (your call — I haven't touched worktrunk):

  • The flaky preview test is the real blocker for the nightly outages. Quarantining it (#[ignore] or skip in CI) or fixing it by hand would stop tend-ci-fix from re-attempting an inherently non-deterministic, open-ended problem every night. Flaky-test debugging is a poor fit for a fixed time budget — it can exceed any cap.
  • Optionally raise this repo's timeout_seconds (tend default 3600) via a workflow_extra override in .config/tend.yaml, but that treats the symptom rather than the cause.
  • The #3133 collision suggests tend-mention and another run were both pushing the same branch; the per-PR concurrency groups serialize same-workflow runs but not mention vs ci-fix on one branch.
Evidence (session-log analysis)
Run Workflow Duration Turns Largest event gap What it was doing at timeout
28261729192 tend-ci-fix 60m00s ~250, 51 Bash ~7.5 min iterating test_switch_picker_preview_auto_refreshes_when_compute_lands, ~5% flaky, not green
28278696966 tend-ci-fix 60m00s ~280, 50 Bash — same test, 3/20 failing, rewriting with bidirectional nav
28296128925 tend-mention (#3133) 60m00s 245, 91 Bash ~9.5 min post-sibling-push reset/rebase, then CI-monitoring poll loop

Max inter-event gaps (~565s / ~450s) line up with the skill's ~9-minute CI-monitoring poll loop and full test-suite invocations — i.e. the agent waiting on its own pushed CI / running 20× flaky reproductions, not a frozen process. The timeout path in the harness (claude/action.yaml) is firing as designed; it's not a supervisor or proxy fault.

tend-agent avatar Jun 27 '26 19:06 tend-agent

let's increase the timeout a lot in tend? to 3 hours or so?

max-sixty avatar Jun 27 '26 20:06 max-sixty

One wrinkle before wiring up a 3h timeout: the 60-minute cap that's firing here (exceeded 3600s timeout) is tend's supervisor timeout_seconds, and there's currently no .config/tend.yaml knob to override it — the generator never emits it, so every workflow falls through to the action's hardcoded 3600 default.

I traced it through the tend source:

  • The supervisor kills the headless run at TEND_TIMEOUT_SEC (= the action's timeout_seconds input), defined in claude/action.yaml with default: "3600".
  • The workflow-rendering macro agent_step in generator/src/tend/templates/macros.yaml.j2 only writes github_token / claude_code_oauth_token / anthropic_api_key / bot_name / model / prompt into the action's with:. It never passes timeout_seconds, and WorkflowConfig in config.py has no such field — so the value can't be set from this repo's config as things stand.

Two corrections to the earlier diagnosis options:

  • A workflow_extra override won't reach it — workflow_extra deep-merges top-level YAML keys only, not the action step's with:.
  • The timeout-minutes knob in tend.example.yaml is a different timeout (GitHub's job timeout, default 6h) and is a no-op for this — the supervisor would still kill the run at 3600s first.

To actually get 3h: the clean path is a small upstream tend change — add a timeout_seconds field to WorkflowConfig/Config (parallel to model) and render it into the agent_step with: block, then set it in .config/tend.yaml. 3h = 10800s, comfortably under GitHub's 6h job default, so no timeout-minutes change is needed alongside it.

Worth weighing against @tend-agent's point that this treats the symptom — the recurring nightly outages are tend-ci-fix grinding on the one unconverged flaky preview test, which a longer cap lets run longer but doesn't converge. A higher cap is still reasonable as a backstop for the genuinely-long tend-mention/review sessions.

Happy to open the tend PR for the timeout_seconds config knob if you want it — just say the word (or confirm the number).

worktrunk-bot avatar Jun 27 '26 21:06 worktrunk-bot

@tend-agent change this upstream to 3H

max-sixty avatar Jun 27 '26 23:06 max-sixty

This is already done upstream: max-sixty/tend#739 bumps the harness timeout_seconds default from 3600 (60 min) to 10800 (3 h) in both Claude actions (claude headless and claude-interactive PTY). Codex has no harness-level timeout, so it's unaffected. CI is green; it's waiting on a maintainer merge. It reaches worktrunk automatically at the next tend release, since the workflows pin max-sixty/tend/<harness>@X.Y.Z.

It takes the simplest path that satisfies "3H upstream" — just raising the default, so every consumer gets it with no config change. The fuller timeout_seconds config knob worktrunk-bot outlined above (a WorkflowConfig field rendered into agent_step) isn't in #739; say the word if you also want a per-workflow override knob and I'll add it.

One interaction to settle, already flagged in #739's body: #736 caps the tend-ci-fix job at timeout-minutes: 120. With a 3 h harness timeout that GitHub job cap would kill ci-fix at 2 h — before the harness timeout — undercutting the bump for the exact workflow that motivated it. Either close #736 or raise its cap to ≥180 min so the harness timeout is the effective gate.

tend-agent avatar Jun 28 '26 00:06 tend-agent

Run 28296128925

handle

Claude headless run exceeded 3600s timeout

worktrunk-bot avatar Jun 28 '26 07:06 worktrunk-bot

Update on the recurring nightly tend-ci-fix outages: the root-cause flaky test @tend-agent identified — test_switch_picker_preview_auto_refreshes_when_compute_lands — has since been fixed and re-enabled.

  • #3264 #[ignore]d it to stop the nightly grind while a proper fix was worked out.
  • #3277 replaced the flaky !main inverse-filter selection with cursor-nav (Down, which clamps on the streamed PR row) and removed the #[ignore], so the test is back on in CI as of a0f07ac.

That was the recurring blocker that timed out tend-ci-fix two nights running, so the underlying outage cause is addressed. The bot has run cleanly all day today (multiple tend-mention/tend-review/tend-notifications successes).

The separate question of a timeout_seconds backstop in tend (3h) is still open and a maintainer's call — leaving this issue open for that decision rather than auto-closing.

worktrunk-bot avatar Jun 28 '26 07:06 worktrunk-bot

Closing the loop on the 3h-timeout half of this: it's no longer an open decision — max-sixty/tend#739 merged at 05:45Z today, raising the harness timeout_seconds default from 3600→10800 (3h) in both Claude actions. And max-sixty/tend#736 (the 120-min tend-ci-fix job cap that would have killed ci-fix at 2h and undercut the bump) was closed, so the interaction I flagged is gone — the harness timeout is the effective gate.

It's on main but not yet in a release (latest is 0.1.8, 2026-06-25, which predates the merge), so it reaches worktrunk at the next tend release since the workflows pin max-sixty/tend/<harness>@X.Y.Z.

So both halves are now in hand: the recurring root cause (the flaky preview test) is fixed and re-enabled per your update above, and the 3h backstop for the genuinely-long sessions is merged upstream. Agreed on leaving this open until the release lands and a clean nightly confirms it.

tend-agent avatar Jun 28 '26 08:06 tend-agent

Failed run at 2026-06-29T08:04:13Z: workflow run (triggered by #3317)

worktrunk-bot avatar Jun 29 '26 08:06 worktrunk-bot

Run 28357450620

review

claude -p exited non-zero (exit=1) — see the session-logs artifact

worktrunk-bot avatar Jun 29 '26 08:06 worktrunk-bot

Failed run at 2026-06-29T09:08:23Z: workflow run

worktrunk-bot avatar Jun 29 '26 09:06 worktrunk-bot

Failed run at 2026-06-29T19:03:15Z: workflow run (triggered by #3322)

worktrunk-bot avatar Jun 29 '26 19:06 worktrunk-bot

Run 28357689944

nightly

Claude headless run exceeded 3600s timeout

Run 28392482233

triage

Claude headless run exceeded 3600s timeout

worktrunk-bot avatar Jun 30 '26 07:06 worktrunk-bot

The enriched failures above are all the same shape — Claude headless run exceeded 3600s timeout (the 60-minute harness cap) across nightly/triage/ci-fix runs.

The fix is already upstream and lands via the nightly tend bump. max-sixty/tend#739 raises the default timeout_seconds from 3600 (60 min) to 10800 (3 hours) in claude/action.yaml, and it was filed in direct response to this issue. That landed in tend 0.1.9.

worktrunk pins the harness via the max-sixty/tend/claude@<ver> action ref (currently @0.1.8 on main), with no timeout-minutes in the tend workflow YAML — so the 3600s cap lives inside the action, and bumping the ref to 0.1.9 is sufficient to pick up the new 3-hour default. #3339 (tonight's chore: update tend workflows (0.1.7 → 0.1.9)) does exactly that.

Suggested disposition: keep this open until #3339 merges, then close once a few subsequent nightly/triage/ci-fix runs complete without hitting the cap.

worktrunk-bot avatar Jun 30 '26 08:06 worktrunk-bot

Closing — the outage condition has cleared.

Both root causes flagged earlier are now resolved and confirmed by clean runs:

  • Recurring tend-ci-fix grind on test_switch_picker_preview_auto_refreshes_when_compute_lands — fixed and re-enabled via #3264 / #3277.
  • 60-minute harness cap (exceeded 3600s timeout) — raised to 3h upstream in max-sixty/tend#739 (tend 0.1.9) and pulled into this repo by #3339, merged 2026-06-30T08:33Z.

Since that merge, every tend workflow run has been clean: 45 successes, 7 skipped, 0 failures (and no exceeded 3600s timeout reports). That satisfies the disposition set above — #3339 merged and subsequent nightly/triage/ci-fix runs complete without hitting the cap.

Reopen if the timeout report resurfaces after the next tend release lands.

worktrunk-bot avatar Jul 01 '26 08:07 worktrunk-bot