Repository navigation
feat(plugin): support parent session creation - #52359
Merged
Merged
Conversation
Co-authored-by: dbpolito <[email protected]>
3 of 6 tasks
Ichinose-Kazuki
pushed a commit
to Ichinose-Kazuki/opencode
that referenced
this pull request
Oct 7, 2026
Co-authored-by: rekram1-node <[email protected]> Co-authored-by: dbpolito <[email protected]>
3 tasks done
mradwankhalil
added a commit
to mradwankhalil/oh-my-openagent
that referenced
this pull request
Oct 19, 2026
…s a child session The V1 facade's session.create read body.parentID but only stored it as metadata.omoParentID and in adapter memory. The native OpenCode V2 create call never received parentID, so every session spawned by task / call_omo_agent / background agents was persisted with parent_id NULL and showed up as a top-level session in the UI. OMO itself did not notice because withParent and childSessions rebuilt the link from metadata. Pass parentID to the native create (supported since OpenCode v2.0.22, anomalyco/opencode#52359). The native host places a child at its parent's location and ignores location when parentID is set, so a child that asked for a different directory (team worktree, task cwd) is moved there with session.move right after creation. The metadata and adapter-state bookkeeping are kept.
Open
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
parentIDthrough plugin and HTTPsession.create, so children inherit the parent's Location rather than becoming root sessions. Missing parents return the declared 404.v2. The original work is credited to @dbpolito as a commit co-author; no MDX documentation edits are carried over.Related issues
Verification
bun run generateinpackages/clientbun run checkcould not complete: the unrelated Posts package requires Node >=22.12.0; this host has Node 18.19.1.Requested by: @rekram1-node (Aiden via Slack)