Skip to content

Conversation

mojodna
Copy link

@mojodna mojodna commented Sep 26, 2025

Issue #, if available: #3008

Description of changes:

Fixes database serialization errors when using added context files.

Root cause: Session context paths (from /context add) were failing serialization with a silent "Session paths are not serialized" error, preventing conversation state from being saved to the database.

Changes:

  • Add custom serializer for ContextManager.paths that filters out session paths
  • Session paths are now excluded from database persistence (as originally intended)
  • Replace silent .ok() error handling with proper tracing logging

Testing:

  • Add unit test for serialization filtering behavior
  • Verify conversation persistence works with mixed agent/session contexts

This maintains the intended behavior where session context is temporary while fixing database persistence for conversations with non-default agents.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fixes database serialization errors when using added context files.

Root cause: Session context paths (from /context add) were failing serialization with a
silent "Session paths are not serialized" error, preventing conversation state from
being saved to the database.

Changes:
- Add custom serializer for ContextManager.paths that filters out session paths
- Session paths are now excluded from database persistence (as originally intended)
- Replace silent .ok() error handling with proper tracing logging

Testing:
- Add unit test for serialization filtering behavior
- Verify conversation persistence works with mixed agent/session contexts

This maintains the intended behavior where session context is temporary while
fixing database persistence for conversations with non-default agents.

Fixes aws#3008
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