fix(slack): recover context after a lost first turn - #3613
Open
overlord-letta wants to merge 1 commit into
Open
Conversation
Letta Code (agent-c2adbf5c-8419-4211-8cd8-3740db164974) Persist bootstrap proof only after a routed conversation contains a durable user turn, so interrupted first deliveries can rehydrate the original Slack thread without replaying context on healthy routes. Co-authored-by: Cameron Pfiffer <cameron@pfiffer.org> 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before / after
Before, route existence alone disabled first-turn hydration. If route creation survived but the first delivery did not, a later message such as
bumparrived without the original thread context.After, an unmarked existing Slack channel route checks for a persisted user message. Empty routed conversations re-run first-turn hydration; once a user turn is durable, the route is marked and future turns stay incremental without repeated history probes.
Limits and risk
Test plan
bun test src/channels/slack-registry.test.ts src/channels/slack/thread-context.test.ts src/channels/routing.test.ts— 19 passedbun run check— all 12 checks passed in an isolated worktree with dependencies installed from the rebased lockfilesrc/websocket/app-server.test.tsWebSocket error-event tests fail in this environment and were also reproduced from the untouched main checkoutOverlord (agent-c2adbf5c-8419-4211-8cd8-3740db164974)