Skip to content

fix(session): surface pending subagent prompts across sessions - #705

Merged
benjaminshafii merged 1 commit into
different-ai:devfrom
gh-xj:fix/688-subagent-prompt-fallback
Mar 3, 2026
Merged

benjaminshafii merged 1 commit into
different-ai:devfrom
gh-xj:fix/688-subagent-prompt-fallback

Conversation

@gh-xj

@gh-xj gh-xj commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix pending prompt selection to avoid subagent requests being hidden when parent session is selected
  • for both permission and question prompts:
    • prefer prompt from selected session when available
    • otherwise fall back to first pending prompt across all sessions

Why

Issue #688 reports broken primary/subagent communication. A concrete app-side failure mode was that pending subagent questions/permissions were effectively invisible unless the user manually switched into the subagent session.

This patch ensures pending prompts remain actionable from the current UI context.

Closes #688.

Testing

Ran

  • pnpm typecheck

Result

  • Fails due existing repo/toolchain issues unrelated to this patch.
  • No diagnostics reported in changed file:
    • packages/app/src/app/context/session.ts

Manual verification

  1. Start a parent session and trigger a subagent task that requests permission or asks a question.
  2. Keep parent session selected.
  3. Confirm prompt modal is still surfaced (fallback to global pending prompt).
  4. Answer/reply and confirm flow resumes.

Copilot AI review requested due to automatic review settings March 1, 2026 07:58
@vercel

vercel Bot commented Mar 1, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-software Ready Ready Preview, Comment Mar 1, 2026 7:59am

@vercel

vercel Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@gh-xj is attempting to deploy a commit to the 0 Finance Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes prompt selection in the session store so permission/question modals remain visible when the selected (parent) session has no pending prompts but a subagent session does, addressing broken primary/subagent communication reported in #688.

Changes:

  • Update activePermission selection to prefer the selected session’s pending permission when present, otherwise fall back to the first global pending permission.
  • Update activeQuestion selection to prefer the selected session’s pending question when present, otherwise fall back to the first global pending question.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@benjaminshafii
benjaminshafii merged commit 50368e9 into different-ai:dev Mar 3, 2026
13 of 14 checks passed
GGwujun pushed a commit to GGwujun/openwork that referenced this pull request Mar 4, 2026
GGwujun pushed a commit to GGwujun/openwork that referenced this pull request Mar 4, 2026

This branch was successfully deployed

1 active deployment
Preview – openwork-software — 9d67d8b1 Deployed Mar 1, 2026 by vercel[bot]
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.

[Bug]: A2A communication is not happening

3 participants