Skip to content

feat(agents): add Copilot SDK session resume and lifecycle management#7

Open
tag-assistant wants to merge 1 commit into
feat/copilot-sdk-providerfrom
feat/session-resume
Open

feat(agents): add Copilot SDK session resume and lifecycle management#7
tag-assistant wants to merge 1 commit into
feat/copilot-sdk-providerfrom
feat/session-resume

Conversation

@tag-assistant

Copy link
Copy Markdown
Owner

Summary

Sessions now persist across restarts via disconnect() instead of destroy(), enabling resume on next invocation.

Changes

  • copilot-sdk.ts:
    • destroy()disconnect() in finally block (sessions persist)
    • New exports: listCopilotSessions(), getLastCopilotSessionId(), destroyCopilotSession()
    • New types: CopilotSessionFilter, CopilotSessionMetadata
  • copilot-runner.ts — logs new vs resumed session
  • Tests: 7 new tests for session lifecycle management (23 total passing)

Key Behavior Change

runCopilotAgent() now calls session.disconnect() instead of session.destroy(), keeping session state for later resume via sessionId.

Part of #4 (Copilot SDK Deep Integration)

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