Skip to content

fix: route prompt input to parent session when viewing subagent#17172

Open
HadiDawoud wants to merge 1 commit intoanomalyco:devfrom
HadiDawoud:fix/subagent-input-routing
Open

fix: route prompt input to parent session when viewing subagent#17172
HadiDawoud wants to merge 1 commit intoanomalyco:devfrom
HadiDawoud:fix/subagent-input-routing

Conversation

@HadiDawoud
Copy link

Issue for this PR

Closes #4422

Type of change

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

What does this PR do?

When viewing a subagent (child) session, the Prompt component was always
sending input to route.sessionID which is the child session ID. So any
input typed while in a subagent view would go to the incorrect wrong session.

Fixed by passing session()?.parentID ?? route.sessionID to the Prompt's
sessionID prop, so when you're in a child session it routes input correctly to the
parent instead.

How did you verify your code works?

Ran the project locally with bun dev, navigated into a subagent session
and verified that input now goes to the parent session correctly.

Screenshots / recordings

Terminal UI change
Unable to capture a before/after screenshot as the bug
requires navigating into an active subagent session to reproduce. The fix is
a one-line change to the sessionID prop on the Prompt component.

Checklist

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Primary agent responds in subagent view; delegated subagent views become inaccessible

1 participant