fix: resolve clarification workflow reset in multi-turn planning#84
Open
MaxLinCode wants to merge 3 commits intomainfrom
Open
fix: resolve clarification workflow reset in multi-turn planning#84MaxLinCode wants to merge 3 commits intomainfrom
MaxLinCode wants to merge 3 commits intomainfrom
Conversation
…cation schemas Clarification entities and pending clarifications now carry a parentTargetRef field that back-references the write workflow's target. Uses .optional().default(null) for backward compatibility with existing records. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-open-per-workflow When creating a clarification entity, copy the targetRef from the current pending_write_operation into parentTargetRef. Close any prior open clarifications before creating a new one to enforce a single active clarification per workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… focus_entity_id For clarification_answer turns, resolve the write target from the open clarification's parentTargetRef instead of focus_entity_id (which may point at the clarification entity itself). Also parse entity registries at the turn-router and decide-turn-policy boundaries to apply Zod defaults for the new parentTargetRef field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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
parentTargetRefto clarification entities and pending clarifications, creating a back-pointer from the clarification to the original write targetparentTargetRefwhen creating clarifications, enforce one-open-per-workflow by closing prior pending clarificationsresolveWriteTargetnow readsparentTargetReffrom the open clarification instead offocus_entity_idfor clarification answers, preventing workflow resetContext
When a user said "schedule gym for tomorrow" → assistant asked "what time?" → user answered "10am, 30min", the system was losing the
dayfield andoriginatingText. Root cause:focus_entity_idpointed at the clarification entity (a question, not a write target), causingapplyWriteCommitto detect a target change and wipe accumulated fields.Test Plan
🤖 Generated with Claude Code