diff --git a/pkg/agentic/commands_session_test.go b/pkg/agentic/commands_session_test.go index 79fbadd..07e3fff 100644 --- a/pkg/agentic/commands_session_test.go +++ b/pkg/agentic/commands_session_test.go @@ -119,7 +119,10 @@ func TestCommandsSession_CmdSessionResume_Good(t *testing.T) { assert.True(t, output.Success) assert.Equal(t, "ses-abc123", output.Session.SessionID) assert.Equal(t, "active", output.Session.Status) - assert.NotEmpty(t, output.HandoffContext) + assert.Equal(t, "ses-abc123", output.HandoffContext["session_id"]) + handoffNotes, ok := output.HandoffContext["handoff_notes"].(map[string]any) + require.True(t, ok) + assert.Equal(t, "Ready for review", handoffNotes["summary"]) assert.Len(t, output.RecentActions, 2) assert.Len(t, output.Artifacts, 1) } diff --git a/pkg/agentic/session.go b/pkg/agentic/session.go index a715d5e..a4a75ba 100644 --- a/pkg/agentic/session.go +++ b/pkg/agentic/session.go @@ -610,7 +610,7 @@ func (s *PrepSubsystem) sessionResume(ctx context.Context, _ *mcp.CallToolReques return nil, SessionResumeOutput{ Success: true, Session: session, - HandoffContext: session.Handoff, + HandoffContext: sessionHandoffContext(session), RecentActions: recentSessionActions(session.WorkLog, 20), Artifacts: session.Artifacts, }, nil diff --git a/pkg/agentic/session_test.go b/pkg/agentic/session_test.go index a3c6aa1..3e0d648 100644 --- a/pkg/agentic/session_test.go +++ b/pkg/agentic/session_test.go @@ -360,7 +360,10 @@ func TestSession_HandleSessionResume_Good(t *testing.T) { output, ok := result.Value.(SessionResumeOutput) require.True(t, ok) assert.Equal(t, "active", output.Session.Status) - assert.Equal(t, "Ready for review", output.HandoffContext["summary"]) + assert.Equal(t, "ses_resume", output.HandoffContext["session_id"]) + handoffNotes, ok := output.HandoffContext["handoff_notes"].(map[string]any) + require.True(t, ok) + assert.Equal(t, "Ready for review", handoffNotes["summary"]) require.Len(t, output.RecentActions, 1) }