Conversation
…gent execution The ChatMessageBubble memo comparator only checked state.status for the last message part, missing metadata changes. When a sub-agent starts, the backend publishes the child sessionId via SSE in state.metadata while status remains "running", so the memo returned true (skip re-render) and the DelegateTaskCard never received the updated childSessionId — leaving the button permanently disabled until a full page refresh. Add state.metadata to the memo comparison so the component re-renders when tool metadata (including sessionId) arrives. Made-with: Cursor
Previously, clicking any "create" button (new session, create agent, workflow chat, etc.) would immediately create a session via API, causing empty sessions to pollute the session list. Now sessions are created lazily — only when the user actually sends their first message. Key changes: - Add `createAndSend` helper to `useSessionChat` that atomically creates a session and sends the initial message - Update Session page to use a ref flag (`isCreatingNewRef`) so the auto-select-first-session effect doesn't fight with the "new session" intent - Update ChatDialog, CreateAgentChat, EntitySheet, and CreateChatTab to pass `onCreateAndSend` to SessionChat for deferred creation - Fix ChatDialog `initialPrompt` handling to use `createAndSend` directly, preventing double-send - Fix EntitySheet `openRex(msg)` to call `createAndSend` when no session exists yet Made-with: Cursor
The previous commit deferred session creation globally, but the Session management page needs to create real sessions on button click so users can batch-create empty sessions. Revert the deferral for this page only; ChatDialog and CreateAgentChat still use deferred creation. Made-with: Cursor
Keep main's JSON.stringify deep-comparison for metadata, which correctly handles object identity changes. Made-with: Cursor
xiami762
approved these changes
Apr 13, 2026
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.
fix(webui): restore immediate session creation on Session page
management page needs to create real sessions on button click so users
can batch-create empty sessions. Revert the deferral for this page only;
ChatDialog and CreateAgentChat still use deferred creation.