Continue after compact 2 - #262
Merged
Merged
Conversation
…instruction following - Add 'YOU MUST FOLLOW THESE INSTRUCTIONS' header - Add IMPORTANT, ACTION REQUIRED, CRITICAL markers to key instructions - Makes instructions stand out from contextual text in synthetic injection
Two-pronged fix for post-compaction context loss: 1. Enhance experimental.session.compacting hook to inject full phase instructions (via WhatsNextHandler) into the compaction summary so the AI retains complete workflow context even when chat.message does not fire for the synthetic auto-continue message. 2. Fix post-compaction prompt injection by switching from the blocking client.session.prompt() to client.session.promptAsync(), which fires and forgets (HTTP 204) without blocking the Effect runtime. Add a 500ms delay to let the runner state machine settle before the phase-aware 'Continue with the current phase.' message is sent. Also adds typed BusEvent discriminated union to types.ts to replace the previous unknown event type in the event hook signature.
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.
No description provided.