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): persist subagent session id before child starts by OpeOginni · Pull Request #53188 · anomalyco/opencode

Conversation

@OpeOginni

@OpeOginni OpeOginni commented Oct 4, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #36349

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • If the server dies while a subagent runs, the parent loses the child's session ID, because the subagent tool only reports it through context.progress, which is never stored.
  • On restart, the runner already adds metadata.sessionID to the "Tool execution interrupted" error, but the stored tool part never had it, so the main agent could not continue the child.
  • Adds a small Session.linkSubagent method that stores only the child session ID on the running tool part, before the child gets any work (new or continued children).
  • No new events, schema, or client changes; normal success/failure still replaces the metadata as before.

How did you verify your code works?

  • Added a test in tool-subagent.test.ts checking the parent's stored tool part already has the child session ID when the child's prompt is admitted; it fails without the fix.
  • tool-subagent, session-runner, and session-execution tests pass.
  • bun run check passes.

Screenshots / recordings

BEFORE

Screen.Recording.2026-09-30.at.15.05.08.mov

AFTER

Screen.Recording.2026-10-04.at.21.04.51.mov

Checklist

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@OpeOginni
fix(core): persist subagent session id before child starts
307576d
@github-actions github-actions Bot added the needs:issue label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added the contributor label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@OpeOginni
Merge branch 'v2' into persist-subagent-link
c3ed7e8
@kitlangton kitlangton mentioned this pull request Oct 8, 2026
fix(core): persist subagent links before child execution #54000
Closed
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:32
@github-actions github-actions Bot removed the needs:issue label Oct 10, 2026
@opencode-agent opencode-agent Bot mentioned this pull request Oct 16, 2026
subagent: sessionID continuation forks running lanes — zero-context sidecar spawns, no parentage in payload #56249
Closed
@OpeOginni OpeOginni closed this Oct 27, 2026
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

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

V2: preserve subagent parent completion across restart

Uh oh!

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

1 participant

@OpeOginni
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.