Skip to content

feat: continue conversation history for ticketless Slack threads#223

Merged
m-mizutani merged 2 commits into
mainfrom
worktree-lexical-waddling-dolphin
Jun 17, 2026
Merged

feat: continue conversation history for ticketless Slack threads#223
m-mizutani merged 2 commits into
mainfrom
worktree-lexical-waddling-dolphin

Conversation

@m-mizutani

Copy link
Copy Markdown
Contributor

Summary

Ticketless Slack threads (an @warren mention on a thread that has not been escalated into a ticket) previously lost their AI working memory between turns — the agent appeared to "forget" everything on each new mention.

The infrastructure for cross-turn continuation already existed: every ticketless thread is assigned a deterministic Session ID (slack_ticketless_<hash(channel,thread)>) by ResolveSlackSession, and session history is stored keyed by SessionID (v1/sessions/<id>/history.json), independent of any ticket. The only thing preventing continuation was an if !ticketless guard on both the load and save paths.

This PR removes those guards so that working memory is persisted and restored per thread regardless of ticket association.

Changes

  • pkg/usecase/chat.gobuildChatContext now loads session history whenever a Session was resolved (if sess != nil), not only for ticketed threads. This is strategy-agnostic, so both aster and bluebell benefit.
  • pkg/usecase/chat/bluebell/bluebell.go — the two terminal saveSessionHistory calls now run for ticketless threads too (saveSessionHistory is keyed by SessionID and is a no-op when no Session was resolved).
  • pkg/usecase/chat/aster/aster.go — same change for the default strategy.
  • saveLatestHistory (the ticketID-keyed latest.json crash-recovery snapshot) remains gated on !ticketless: it requires a ticket and is not used for cross-turn continuation.

Scope / impact

  • No struct, field, schema, or signature changes — only branch conditions and comments.
  • Behavior changes only for the "ticketless + resolved Session" combination, i.e. Slack ticketless threads. Web/CLI require tickets (or run with no Session) and are unaffected.
  • Ticketed threads are completely unchanged.
  • No migration needed. Pre-existing ticketless threads have no saved history, so their first mention after this change is a fresh start; subsequent turns continue.

Tests

  • TestBluebellChat_TicketlessSavesSessionHistory / TestAsterChat_TicketlessSavesSessionHistory — ticketless + Session persists history under the SessionID.
  • TestChatFromSlack_TicketlessContinuesConversation — end-to-end via ChatFromSlack: the deterministic Session is reused across mentions and saved history is restored into chatCtx.History on the next turn.
  • go vet, golangci-lint, gosec, and the full go test ./... suite all pass.

Docs

  • doc/strategy/README.md gains a "Conversation Memory" section documenting SessionID-keyed working memory and ticketless continuation.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables conversation memory persistence for ticketless Slack threads. Previously, session history was only loaded and saved for ticketed threads. Now, working memory (gollem.History) is persisted per Session (keyed by SessionID) for both ticketed and ticketless threads, allowing conversation context to carry over between turns even when no ticket exists. This change is implemented across the aster and bluebell chat strategies, and corresponding unit tests have been added to verify the behavior. I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@m-mizutani
m-mizutani merged commit bb05b8a into main Jun 17, 2026
4 checks passed
@m-mizutani
m-mizutani deleted the worktree-lexical-waddling-dolphin branch June 17, 2026 01:03
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