GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): keep background shell locations alive by opencode-agent[bot] · Pull Request #52580 · anomalyco/opencode

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep a Location's services cached while a shell job started there remains backgrounded and running. Capture the shell's owning Location at job start rather than inferring it later from a Session that may have moved.
  • Recheck for shells admitted during eviction cleanup before detaching the cached graph.
  • Do not pin a parent Location just because it is waiting on a background sub-agent in another Location; completion enters the parent's durable inbox and wakes it normally.

Validation

  • SHELL=/bin/bash bun test test/location-activity.test.ts test/browser-idle.test.ts test/job.test.ts test/tool-shell.test.ts (88 pass, 42 platform skips)
  • bun typecheck from packages/core
  • bun --bun run lint from repo root
  • Full bun run check unavailable on this host's Node 18 (Astro requires Node >=22.12); attempting the whole-workspace check with Bun also hit a host-wide concurrent typecheck crash. Scoped checks above passed.

Requested by: @jlongster (James via Slack)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jlongster
fix(core): keep background shell locations alive
3a7de26
@github-actions github-actions Bot added the contributor label Oct 1, 2026
@SamSpiri

SamSpiri commented Oct 3, 2026

Copy link
Copy Markdown

Supporting data for this PR — it fixes the notification-loss half of the eviction bug, not just the shell kill.

Independent repro on v2.0.22: background: true shell job launched at 18:02, worker idle at 18:03:05 (last durable event in the location), 60-min TTL evicts the location ~19:03, job actually finishes 19:11:33 — and no synthetic completion row is ever written (verified absent in session_message; session_inbox/session_pending empty). The .out file is also removed, matching the watcher's Effect.onInterrupt(() => shell.remove(...)) (tool/plugin/shell.ts:234). The waiting session stayed idle until woken manually 70 min later.

A second background job in the same session that ran < 60 min delivered normally, confirming the path works when the location survives.

Because notifyWhenDone is forkIn'd into the location/plugin scope, keeping the location's services cached while a backgrounded shell is live (as this PR does) is exactly what preserves sessions.synthetic(...) and the auto-resume. Kindly prioritise; this strands any background: true job that outlives the idle TTL, which is a common long-running-build/test pattern.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SamSpiri SamSpiri mentioned this pull request Oct 3, 2026
Terminals are killed when their location is evicted after 60 minutes of chat inactivity #48691
Open
@opencode-agent opencode-agent Bot mentioned this pull request Oct 8, 2026
[FEATURE]: Let agents wait and automatically continue a session #53960
Closed
1 task done
@TonyYanS TonyYanS mentioned this pull request Oct 9, 2026
[Bug] Location inactivity eviction SIGTERMs live background shells after 60 minutes #51828
Closed
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:26
This was referenced Oct 22, 2026
service: background shell silently killed when idle location is evicted; completion notification never delivered #58049
Closed
service: background shell silently killed when idle location is evicted; completion notification never delivered #58050
Closed
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Nov 1, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Nov 1, 2026
@github-actions github-actions Bot mentioned this pull request Nov 1, 2026
📊 AI CLI 工具社区动态日报 2026-11-02 litang9/big_model_radar#640
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@SamSpiri @jlongster
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.