(**UPDATE**): GPT Chat History Only REMEMBERS First Message – Can’t Get Full Thread Working

Hey Glide team and community — I’m building a custom OpenAI-powered chat system in Glide and I’ve hit a wall for over a week. Hoping someone can help me troubleshoot what’s wrong with my message history setup.

:gear: What I’m Building:

A chat assistant that uses Glide’s GPT block (Complete Chat with History) to let users have persistent conversations across sessions — like a mini ChatGPT clone.

  • Each Session is one conversation.
  • Each Message belongs to a Session.
  • Assistant responses are saved as new rows, not just inline in the user’s message row.

:cross_mark: The Problem:

Only the first message is ever REMEMBERED in the message history for GPT.

  • All messages are showing in the chat view — so relations are working fine.
  • BUT GPT only REMEMBERS the very first message.
  • Every response it gives is as if it’s replying to message #1 — like it’s blind to the full thread.

:light_bulb: This isn’t a display issue.
The visual chat log is perfect. The message history memory for GPT is what’s broken.

  • No future user messages seem to be recognized.
  • I know this because only the first message shows the user avatar; all others show a “?”.
  • I confirmed that all messages are being saved with the correct Session ID.
  • I also confirmed the GPT block is inside the detail screen of that Session row.

:white_check_mark: What I’ve Done So Far:

:page_facing_up: Sessions Table (my version of “Chats”):

  • Session ID (Row ID)
  • User Email (set as row owner)
  • Bot Email (pulled from Settings)
  • SessionMsgs_Rel → Relation to Messages where Messages.Session ID = Sessions.Session ID

:speech_balloon: Messages Table:

  • Content: user input
  • Result: assistant response (optional)
  • Role: "user" or "assistant"
  • Email: sender (either logged-in user or bot)
  • Receiver Email: receiver (opposite party)
  • Session ID: points to parent session
  • Timestamp: sent time

Both Email and Receiver Email are Row Owners

:gear: GPT Block Setup (in Messages component):

  • Message History: SessionMsgs_Rel
  • Prompt: pulled from Settings → Prompt
  • Message: Content
  • Session ID: from current Session
  • Result: Result
  • Role: "user"
  • Email: App → User Email
  • Receiver Email: bot email (via lookup or single value)

:brain: GPT Submit Action:

  1. Complete Chat with History
  2. Then → Add Row to Messages with:
  • Content: Result
  • Role: "assistant"
  • Email: bot email
  • Receiver Email: user email
  • Session ID: same session
  • Timestamp: now

:compass: Navigation Logic:

When a session is tapped, I set the current session’s ID into a user-specific column to track active chat.


:test_tube: What I’ve Tried:

  • Double-checked everything 100x over
  • Verified GPT block is in the detail screen of Sessions → SessionMsgs_Rel
  • Ensured roles are being set as "user" and "assistant" in text (not capitalized)
  • Confirmed all Row Owner rules are applied correctly
  • Checked that Submit action writes the assistant reply as a new row, not updating user row
  • Tried logging and watching message flow — everything is saving as expected

:red_question_mark:What I Need:

  • Is there something else Glide needs in the config for the GPT block to access multiple messages by Session ID?
  • Is there a bug with the message history system only remembering the first message?
  • Is there a better way to pass Msgs_Rel into the GPT block for memory?

Screenshots / Reference:

Happy to provide screen recordings or screenshots if needed. This is a core part of my project, and it’s so close — but GPT just isn’t remembering the full message thread.

Appreciate any help —

Thank you so much in advance!


1 Like

Update: It’s working.

After weeks of Glide’s Complete chat (with history) silently dropping memory, I rebuilt the entire flow manually:

• Created a Msg_JSON_Snippet per message
• Joined + wrapped them in [ ] in Sessions
• Looked up that full history into Messages via relation
• Passed the wrapped JSON into the Complete chat block (no history)
• Manually wrote the assistant reply to Messages

Now it remembers every message. Every session. Perfectly.

If Glide’s memory isn’t working for you — stop using their auto-history. Build your own.
You’ll never go back.

1 Like

That’s the general way to build it, but beware with the limit of tokens you can send in a single call, and the cost it would take to keep up a long conversation with that approach.