dropthejase teaches Louis to remember the conversation

Chats now survive a page refresh, a closed tab, even a connection dropped mid-answer.

chat-uiinfrastructure

Until now, a conversation with this fork's legal assistant lived only in the browser tab - close it, reload, and the thread was gone. dropthejase spent ten commits fixing that. Every exchange is now saved to cloud storage and reloaded when you reopen the chat, so a matter you were working through last week is still there when you come back. The save even fires the moment a reply starts streaming, so closing the tab halfway through an answer no longer loses the thread.

There's a quieter win too. An earlier version froze the assistant's underlying instructions into each saved conversation, meaning improvements to how it behaves never reached older chats. dropthejase tore that out - the instructions now always come from the current code, so every conversation, old or new, runs on the latest version.

So what Anyone using a legal AI across multiple sittings - researching a matter over days, not minutes - needs the thread to still be there; this is what makes that possible.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

10 commits from dropthejase/louis, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
6905873f refactor(frontend): merge streamChat functions, wire runtimeSessionId, write messages to Supabase, hydrate on load Jason Lee 2026-05-07 ↗ GitHub
commit body
Merges streamChat/streamProjectChat into a single streamChat taking prompt
directly. Generates runtimeSessionId per chat (handleNewChat) and loads it
from chats.agentcore_session_id for existing chats. Writes user and
assistant messages to Supabase chat_messages (removed from the agent).
Hydrates message history from Supabase when opening an existing chat.
619f3d1f feat(agent): wire S3SessionManager for conversation persistence Jason Lee 2026-05-07 ↗ GitHub
Add SessionManager with S3Storage to createAgent; when a sessionId is
provided the agent auto-persists and restores full message history to
the sessions bucket after each invocation.
702b9381 feat(backend,frontend,infra): chat history from S3 snapshot; sessions bucket Jason Lee 2026-05-07 ↗ GitHub
commit body
Add GET /chat/:chatId/messages backend route that reads the Strands
snapshot_latest.json from S3 and transforms it into MikeMessage[].
Replace Supabase chat_messages hydration in useAssistantChat with a
call to this endpoint; remove frontend chat_messages writes. Add
sessionsBucket to StorageStack and wire SESSIONS_BUCKET_NAME env var
into ApiStack Lambda.
e63a501b feat: AgentCore user ID header, session ID format, Cognito-compatible schema Jason Lee 2026-05-08 ↗ GitHub
40c1e3ad feat: persist AgentCore session ID for multi-turn continuity across refreshes Jason Lee 2026-05-08 ↗ GitHub
commit body
- Add agentcore_session_id + agentcore_session_created_at columns to chats schema
- Add PUT /chat/:chatId/session-id endpoint - writes on first turn, no-ops if already set
- Frontend saves runtimeSessionId to DB after each turn (fire-and-forget)
- On chat load, GET /chat/:chatId/session-id restores the session ID so
  AgentCore can resume the correct S3 snapshot after page refresh
af04dc99 fix: persist AgentCore session ID on chat_id SSE event, not post-stream Jason Lee 2026-05-08 ↗ GitHub
Previously saved after stream completed - tab-close mid-stream lost the
session ID. Now fires immediately when the chat_id event arrives (first
SSE event, before AgentCore runs) so any interruption still persists it.
ae70567f fix(chat): load messages from S3 snapshot instead of empty chat_messages table Jason Lee 2026-05-12 ↗ GitHub
commit body
- getChat() now calls GET /chat/:chatId and GET /chat/:chatId/messages in parallel; messages come from S3 AgentCore session snapshot
- Fix snapshotMessagesToMikeMessages to accept content blocks with no type field (Strands snapshot omits type on text blocks)
- Update FEATURE-PARITY.md with pending items: tier display, account settings parity, credit enforcement
efdae23d feat(agents,api): replace SessionManager with manual S3 conversation persistence Jason Lee 2026-05-13 ↗ GitHub
commit body
Drop Strands SessionManager/S3Storage (baked stale system prompt into every
turn). Own S3 read/write via AfterInvocationEvent hook on conversations/{chatId}/messages.json.
System prompt always fresh from code. API chat history reads same key directly.
838d29ba Merge feature/session-persistence-without-s3sessionamanger into development Jason Lee 2026-05-13 ↗ GitHub
febe83f5 fix(api): restore tool activity + reasoning blocks on chat history reload Jason Lee 2026-05-13 ↗ GitHub
commit body
snapshotMessagesToMikeMessages now handles nested Strands snapshot format:
- toolUse/toolResult blocks use nested objects (no type field) not flat Bedrock format
- reasoning blocks parsed and emitted as reasoning events
- text block filters exclude nested blocks to avoid false matches
- read_document filename extracted from document_metadata block in result text

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-334.md from inside the repo you want the changes in.

⬇ Download capture-thread-334.md