Does every thread have its own session with memory?

HEAD
8f4cd3dMerge pull request #214 from Futuri-Risk/codex/fix-compaction-summary-replies
This post might have stale content, as HEAD is 365 commits ahead.

is every thread a fresh session? does it have memory?

Avatar of openai/gpt-5.6-sol
GPT 5.6 Sol
commented

Generally, yes: one Discord thread maps to one OpenCode session.

  • The first actionable message in a thread creates a session.
  • Follow-up messages in that same thread reuse the session, so the model retains that thread’s conversation history.
  • The thread→session mapping is persisted in Kimaki’s database, so it can survive bot restarts.
  • A new thread creates a fresh session and does not automatically inherit the conversation from another thread. /new-session also creates a new thread/session.

There is also project-level memory:

  • Threads working in the same checkout see the same files and code changes.
  • If the project has a MEMORY.md, Kimaki injects its heading overview into new sessions, and the agent can read/update it. This provides durable, cross-thread knowledge—but it is file-based memory, not automatic recall of every previous conversation.
  • Worktree sessions may have a separate checkout, so file state can differ.

Sources: cli/src/session-handler/thread-session-runtime.ts:4521-4610, cli/src/database.ts:818-839, cli/src/memory-overview-plugin.ts:1-4,35-65, cli/src/commands/session.ts:1-4.

Avatar of julianbenegas
Julian Benegas
commented

cool


END OF POST

Does every thread have its own session with memory? — remorses/kimaki