Skip to content

fix(app): port child-session navigation fix to V2 #35577

Description

@opencode-agent

Problem

In OpenCode V2, clicking a subagent/task invocation can appear to do nothing when the child session is not already present in the app session-list cache. The card has the correct child-session href and the child is available from the direct session endpoint, but the URL remains on the parent. This makes navigation cache-dependent and therefore intermittent.

Source: https://discord.com/channels/1391832426048651334/1447692703549755466/1523734996358009104

Root cause

origin/v2 still resolves target session lineage with a suspending createResource inside the Solid Router navigation transition. For an uncached child session, that suspends the transition before the URL commit.

dev already fixed this in commit 39dfbb53d016d50bb8d2113407b8e20c0bd800c7 / PR #34838 by resolving lineage imperatively outside the router transition. That commit also added subagent-child-navigation.spec.ts.

Verification

  • Base tested: origin/v2 at 147da5d278a
  • Repro: parent timeline contains a task card with a valid child-session href; /session omits the child while /session/:child resolves it. Clicking leaves the URL on the parent.
  • Applying 39dfbb53d016d50bb8d2113407b8e20c0bd800c7 to V2 makes the exact regression test pass (1 passed, 8.3s).

Next step

Port/cherry-pick the app route fix and its regression coverage onto V2, resolving any branch drift.

Metadata

Metadata

Assignees

Labels

2.0bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions