Skip to content

fix(core): report inactivity eviction in interrupted work - #52587

Open
thiago-carneiro wants to merge 1 commit into
anomalyco:v2from
thiago-carneiro:honest-inactivity-errors
Open

thiago-carneiro wants to merge 1 commit into
anomalyco:v2from
thiago-carneiro:honest-inactivity-errors

Conversation

@thiago-carneiro

@thiago-carneiro thiago-carneiro commented Oct 1, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #52597

Type of change

  • Bug fix

What does this PR do?

When idle location eviction interrupts a run, unsettled tool failures report the generic "Tool execution interrupted" — the reason never reaches the message. The run coordinator already records the interruption reason, so I thread it into the unsettled-tool failure message: an eviction-caused interruption now says "Tool execution interrupted: location idle eviction"; user- and shutdown-caused ones keep today's wording. Reporting only — the eviction policy and the hardcoded 60-minute deadline are #51343's questions.

The close-path surface (pending forms cancelled when the location closes, e.g. the "Interaction cancelled because the location shut down" case in #51647) keeps its current wording; I'll follow up with the close-path failure and the question content in that message.

How did you verify your code works?

  • bun run test (packages/core, full suite): 5272 passing, 0 failing, including two new cases in session-runner.test.ts — an eviction-caused interrupt asserts the eviction message, a user-caused one keeps the generic wording
  • Targeted suites (session-step, session-runner, recorded, run-coordinator, execution, location-activity): 292/292
  • bun turbo typecheck: 36/36 packages; bunx oxlint: 0 errors
  • bun run check: all tasks pass (ran in a container — my host's glibc 2.28 predates what the ast-grep binary needs; the same failure occurs on a pristine checkout, so it is environmental)

To confirm the fix: park a session on question, interrupt with reason: "inactivity" (or wait out the 60-minute idle deadline) — the tool failure now names the eviction.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@SamSpiri

SamSpiri commented Oct 3, 2026

Copy link
Copy Markdown

Supporting the reporting side — this would have made a real incident much easier to diagnose.

On v2.0.22 a background: true shell job outlived its location's 60-min idle TTL; eviction interrupted the location-scoped completion watcher, so no completion notification was ever delivered and the session stayed idle for 70 min. Nothing anywhere surfaced the word "inactivity" or tied it to the eviction — it looked like a generic stall and took a DB dig to find the zero synthetic row.

Surfacing the reason: "inactivity" interruption reason (already passed at location-activity.ts:65) in the affected work's failure/interruption message is exactly the missing signal. Fine to keep policy in #51343, but the reporting part is worth landing independently.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants