Skip to content

Fix: assistant history always null due to mismatched JSON field key in buildConversationContext#2

Open
parthloglogn with Copilot wants to merge 2 commits into
feature/agent-migration-improvementsfrom
copilot/sub-pr-1
Open

Fix: assistant history always null due to mismatched JSON field key in buildConversationContext#2
parthloglogn with Copilot wants to merge 2 commits into
feature/agent-migration-improvementsfrom
copilot/sub-pr-1

Conversation

Copilot AI commented Mar 12, 2026

Copy link
Copy Markdown

buildConversationContext() was reading agentSummary from Redis history entries, but SessionStore.saveChatEntry() persists the field as agentOutput. This caused the assistant side of every history turn to deserialize as null, meaning multi-turn conversations only replayed user messages.

Changes

  • SecuritySupervisorAgentService.java
    • Changed JSON field read from agentSummaryagentOutput to align with what SessionStore writes
    • Updated Javadoc to document the correct Redis entry shape and added @link cross-reference to SessionStore#saveChatEntry
// Before — always resolved to null
String summary = node.path("agentSummary").asText(null);

// After — correctly reads the persisted field
String summary = node.path("agentOutput").asText(null);

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ionStore

Co-authored-by: parthloglogn <194048287+parthloglogn@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on typed exception hierarchy implementation Fix: assistant history always null due to mismatched JSON field key in buildConversationContext Mar 12, 2026
@parthloglogn
parthloglogn marked this pull request as ready for review March 20, 2026 03:54
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.

2 participants