Skip to content

fix: prevent agent RPC crash before session init#491

Draft
maxtara wants to merge 1 commit intostagingfrom
bug/agent-exception-1
Draft

fix: prevent agent RPC crash before session init#491
maxtara wants to merge 1 commit intostagingfrom
bug/agent-exception-1

Conversation

@maxtara
Copy link
Collaborator

@maxtara maxtara commented Mar 2, 2026

Summary

  • guard \copilot:getSessionAgents\ when \session.rpc\ is not initialized yet
  • guard \copilot:getActiveAgent\ the same way to avoid related runtime errors
  • return safe defaults (empty agent list / null active agent) until session RPC is ready

Validation

  • npm run build
  • npm run dev (app launches)

@maxtara maxtara marked this pull request as ready for review March 2, 2026 01:58
@maxtara maxtara marked this pull request as draft March 2, 2026 02:00
When the backend CLI drops a session, agent and compaction IPC handlers now catch the 'Session not found' error, call resumeDisconnectedSession, and retry — matching the existing pattern in copilot:send.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maxtara maxtara force-pushed the bug/agent-exception-1 branch from b2d3046 to 95880a0 Compare March 2, 2026 03:45
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.

1 participant