Skip to content

feat(core): intelligent streaming retry with continuation and multi-step enhancements#6286

Merged
wtfsayo merged 60 commits intodevelopfrom
feature/multi-step-enhancements
Jan 13, 2026
Merged

feat(core): intelligent streaming retry with continuation and multi-step enhancements#6286
wtfsayo merged 60 commits intodevelopfrom
feature/multi-step-enhancements

Conversation

@wtfsayo
Copy link
Member

@wtfsayo wtfsayo commented Dec 26, 2025

Summary

This PR adds intelligent streaming retry logic inspired by Anthropic's partial response recovery, along with multi-step workflow enhancements.

Key Features

🔄 Intelligent Streaming Retry Logic

  • Complete text detection: When XML parsing fails but <text> extraction completed (closing tag found), uses streamed text directly instead of retrying
  • Continuation prompts: When text is cut mid-stream, automatically requests continuation from the LLM with the already-streamed content as context
  • Retry state tracking: New StreamingContext methods (reset(), getStreamedText(), isComplete()) enable smart retry decisions

🛠️ Streaming Infrastructure

  • createStreamingContext(): New helper to create streaming contexts with retry state management built-in
  • createStreamingRetryState(): Tracks streamed text and completion state for retry logic
  • XmlTagExtractor.flush(): Returns buffered content when streams end unexpectedly
  • Per-phase streaming: Multi-step mode now handles streaming contexts per-phase (decision, action, summary) separately

🔒 Security Fix

  • ReDoS prevention: Replaced regex with indexOf() for actions tag detection to prevent catastrophic backtracking

📋 Multi-step Enhancements

  • Improved parameter extraction and validation for action calls
  • Better logging with structured metadata
  • Normalized handling of empty action strings

Changes by File

File Changes
packages/core/src/services/default-message-service.ts Streaming retry logic, continuation prompts, per-phase streaming
packages/core/src/utils/streaming.ts createStreamingContext(), createStreamingRetryState(), flush() methods, ReDoS fix
packages/core/src/streaming-context.ts Extended StreamingContext interface with retry methods
packages/core/src/types/streaming.ts New IStreamingRetryState interface
packages/core/src/prompts.ts Updated multi-step template with parameters support
packages/plugin-bootstrap/src/providers/actions.ts formatActionsWithParams() for LLM tool calling
packages/plugin-bootstrap/src/__tests__/multi-step.test.ts Comprehensive retry and parameter tests

How Retry Logic Works

┌──────────────────────────────────────────────────────────────────┐
│                    LLM Response Streaming                        │
└────────────────────────────┬─────────────────────────────────────┘
                             │
                             ▼
                   ┌─────────────────┐
                   │  XML Parse OK?  │
                   └────────┬────────┘
                            │
              ┌─────────────┴─────────────┐
              │                           │
         Yes ▼                       No  ▼
    ┌────────────────┐        ┌─────────────────────┐
    │  Use Parsed    │        │  Check Streaming    │
    │  Response      │        │  Context State      │
    └────────────────┘        └──────────┬──────────┘
                                         │
                           ┌─────────────┴─────────────┐
                           │                           │
                  isComplete() ▼                  No  ▼
               ┌─────────────────┐        ┌─────────────────┐
               │  Use Streamed   │        │  Has Partial    │
               │  Text Directly  │        │  Text?          │
               └─────────────────┘        └────────┬────────┘
                                                   │
                                     ┌─────────────┴─────────────┐
                                     │                           │
                                Yes ▼                       No  ▼
                          ┌─────────────────┐        ┌─────────────────┐
                          │  Request LLM    │        │  Reset & Retry  │
                          │  Continuation   │        │  From Scratch   │
                          └─────────────────┘        └─────────────────┘

Test Plan

  • Unit tests for streaming retry state creation and methods
  • Tests for continuation logic when text is cut mid-stream
  • Tests for using streamed text when extraction is complete
  • Tests for ReDoS-safe actions parsing
  • Tests for parameter extraction (object, JSON string, invalid JSON)
  • All 19 multi-step tests pass
  • Core package builds successfully
  • Plugin-bootstrap package builds successfully

Note

  • CLI (deploy): New Docker utilities to build and push images to ECR with platform detection, BuildKit/QEMU cross-compile warnings, image inspect/checksum, progress spinner, digest capture, and cleanup (docker-build.ts).
  • Client (chat UI): Major refactor of chat.tsx adding DM channel creation/selection/deletion, URL-based channel routing, safer send/retry flows, media parsing/attachment handling, auto-scroll improvements, confirmation dialogs, and responsive/floating sidebar layout for mobile/desktop.
  • Core (tests): Extensive new tests for AgentRuntime (plugins, initialize, models/actions, settings/overrides, embedding dimension) and streaming context isolation/ALS behavior.
  • Prompts: Multi-step templates updated (multiStepDecisionTemplate, multiStepSummaryTemplate) to clarify provider/action selection, parameters, and finish criteria.
  • Configs/metadata: Minor path/package/config updates (examples tsconfig paths, package manifests, docs README).

Written by Cursor Bugbot for commit e2bf8c7. This will update automatically on new commits. Configure here.

@wtfsayo wtfsayo force-pushed the feature/multi-step-enhancements branch from 4a70901 to d2a6f53 Compare December 26, 2025 16:43
@elizaOS elizaOS deleted a comment from coderabbitai bot Dec 26, 2025
@elizaOS elizaOS deleted a comment from claude bot Dec 26, 2025
@elizaOS elizaOS deleted a comment from claude bot Dec 26, 2025
@elizaOS elizaOS deleted a comment from claude bot Dec 26, 2025
@elizaOS elizaOS deleted a comment from claude bot Dec 26, 2025
@wtfsayo wtfsayo force-pushed the feature/multi-step-enhancements branch from d2a6f53 to cd013e5 Compare December 26, 2025 16:46
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/multi-step-enhancements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@claude

This comment was marked as duplicate.

@standujar standujar force-pushed the feature/multi-step-enhancements branch from a1fbf93 to 192cdf6 Compare January 2, 2026 15:11
@claude

This comment was marked as resolved.

@standujar

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@standujar

This comment was marked as resolved.

@standujar

This comment was marked as resolved.

github-actions bot and others added 20 commits January 12, 2026 18:46
Automated patch version bump from production release
…r extraction

- Add retry logic for XML parsing with exponential backoff (1s, 2s, 4s... capped at 8s)
- Add summary generation retry with graceful fallback message
- Add parameter extraction from multi-step decision template
- Add formatActionsWithParams() for LLM parameter schema information
- Add bounds checking for retry counts (1-10 range)
- Add comprehensive tests for retry and parameter scenarios
Enhanced JSON parameter parsing to ensure only non-null objects are accepted, with appropriate logging for invalid types. Updated related test and provider logic to match stricter validation and improved code consistency.
Added explicit checks and warnings for array-type parameters in both DefaultMessageService and multi-step tests. Metadata properties in accumulated state are now prefixed with underscores to avoid collisions with action parameters.
Improves logging granularity and clarity for multi-step message processing, including step-by-step info, provider/action execution, and summary generation. Adds streaming support for summary output in multi-step mode and ensures streaming contexts are correctly managed for both single-shot and multi-step flows. Minor code formatting and consistency improvements applied.
Replaces 'state' with 'accumulatedState' in provider and action calls to ensure correct state is used. Adds logic to prevent duplicate streaming of summary output to the user on retry attempts, tracking streaming status with 'hasStreamedToUser'.
Marks streaming as started before sending content to prevent duplicate streams on retries in DefaultMessageService. Updates action parameter formatting to handle invalid definitions and provide defaults for missing type or description.
Updates submodule from 797ad22 (init commit) to 4a33c0c
(Add ElizaOS scenario testing rules)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…entries

- Add array check to prevent malformed parameter output
- Filter invalid param entries upfront to avoid dangling headers
- Added methods to StreamingContext for managing streaming state, including reset, getStreamedText, and isComplete.
- Improved DefaultMessageService to utilize intelligent retry logic for streaming, allowing for continuation prompts when text extraction is incomplete.
- Updated tests to validate new streaming context features and ensure correct behavior during retries.
- Enhanced IStreamExtractor interface with reset and flush methods for better state management.
- Removed redundant '[MULTI-STEP]' prefix from logging messages in DefaultMessageService to enhance clarity and readability.
- Updated various log statements to maintain consistency while preserving essential information about the multi-step processing flow.
- other: fix docs
Replace ACTIONS_REGEX with indexOf-based extraction in detectResponseStrategy.
This eliminates potential polynomial-time regex matching on malicious inputs.
Ensures continuation response is properly streamed to user in single-shot
mode, matching the behavior of multi-step continuation at line 1862.
…nt results

Previously, calling getStreamedText() multiple times would return different
results because flush() empties the buffer. Now the flushed content is
accumulated into streamedText, ensuring consistent results across calls.
…elizaOS/eliza into feature/multi-step-enhancements

# Conflicts:
#	packages/core/src/services/default-message-service.ts
Copilot AI review requested due to automatic review settings January 13, 2026 14:42
@claude
Copy link
Contributor

claude bot commented Jan 13, 2026

Claude finished @wtfsayo's task in 1m 23s —— View job


PR Review - Multi-Step Workflow Enhancements

Todo List:

  • Read CLAUDE.md for repo guidelines
  • Review changed files and understand implementation
  • Check previous review comments and what's been addressed
  • Verify test coverage and check for issues
  • Provide concise actionable feedback

Summary

This PR adds robust retry logic and parameter extraction to multi-step workflows. The implementation is well-structured with proper validation, exponential backoff, and comprehensive test coverage.

✅ Verified - All Previous Issues Addressed

Issue Status Location
JSON.parse null validation ✅ Fixed default-message-service.ts:1354-1356
Array validation consistency ✅ Fixed Both string (1356) and object (1384-1386) paths check !Array.isArray()
Parameter passing uses accumulatedState ✅ Fixed Line 1632 passes accumulatedState to processActions
Metadata collision avoided ✅ Fixed Uses _source/_timestamp (1413-1414)
formatActionsWithParams null safety ✅ Fixed Lines 26-36 validate parameters and filter invalid entries
Parameters header validation ✅ Fixed Line 39 checks validParams.length === 0
Single-shot continuation streaming ✅ Fixed Line 1102 uses runWithStreamingContext

✅ Implementation Quality

Retry Logic:

  • Configurable via MULTISTEP_PARSE_RETRIES and MULTISTEP_SUMMARY_PARSE_RETRIES
  • Bounded to 1-10 range with sensible defaults (5)
  • Exponential backoff: 1s, 2s, 4s... capped at 8s
  • Clear logging at each retry attempt

Parameter Extraction:

  • Handles JSON string parameters with proper try/catch
  • Handles object parameters directly
  • Validates non-null, non-array objects in both paths
  • Stores in state.data.actionParams AND action-specific namespace
  • Graceful degradation on invalid input

Streaming Infrastructure:

  • New createStreamingContext() helper with retry state management
  • IStreamingRetryState interface for intelligent retry decisions
  • Proper reset() and flush() methods on extractors
  • getStreamedText() accumulates flushed content for consistent results

✅ Test Coverage

  • 19 comprehensive tests in multi-step.test.ts
  • Tests cover: retry logic, parameter extraction, edge cases
  • Uses bun:test correctly (per CLAUDE.md guidelines)

✅ Template

The multiStepDecisionTemplate properly uses {{actionsWithParams}} (line 190) and includes valid JSON examples (lines 213-216).

💡 Minor Non-Blocking Suggestions

  1. Test helper metadata (multi-step.test.ts:1092-1093): Uses source/timestamp instead of _source/_timestamp like the actual implementation. Consider aligning for consistency, though this is test-only.

Recommendation: ✅ APPROVE

The implementation is solid, all previous review concerns have been addressed, proper TypeScript types are used throughout, tests are comprehensive using bun:test, and builds succeed. The streaming flag timing issue was explicitly marked as out of scope by reviewers.


Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances multi-step workflows with retry logic, parameter extraction, and improved error handling while also optimizing database operations and refactoring initialization logic.

Changes:

  • Added configurable retry logic with exponential backoff for XML parsing failures in multi-step workflows
  • Implemented parameter extraction and passing from LLM decisions to actions via <parameters> XML key
  • Optimized database queries to reduce N+1 patterns and added idempotent upsert operations
  • Refactored runtime initialization to parallelize database operations and improve startup performance

Reviewed changes

Copilot reviewed 56 out of 57 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/core/src/services/default-message-service.ts Core retry logic, parameter extraction, streaming context improvements, and intelligent continuation handling
packages/core/src/prompts.ts Updated multi-step template to include parameters key and actionsWithParams provider
packages/plugin-bootstrap/src/providers/actions.ts Added formatActionsWithParams function and actionsWithParams provider output
packages/plugin-bootstrap/src/tests/multi-step.test.ts Comprehensive tests for retry logic and parameter extraction
packages/core/src/utils/streaming.ts Added streaming retry state APIs and createStreamingContext helper
packages/core/src/runtime.ts Parallelized initialization and added ensureEntity helper
packages/plugin-sql/src/base.ts Added idempotent upsert operations with onConflictDoNothing
packages/server/src/api/index.ts Added toRouteRequest converter for plugin route handlers
packages/server/src/services/message.ts Removed duplicate error handling for ensureWorldExists/ensureRoomExists

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1330 to +1333
// Normalize action: empty string or whitespace-only should be treated as undefined
const rawAction =
typeof parsedStep.action === 'string' ? parsedStep.action.trim() : undefined;
const action = rawAction && rawAction.length > 0 ? rawAction : undefined;
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The action normalization logic converts empty/whitespace strings to undefined, but the prompt template instructs the LLM to use empty string "" when no action is needed. This creates a disconnect - the LLM is told to output "" but the code treats it as undefined. Consider either updating the prompt to say 'omit the action tag' or accepting "" as a valid 'no action' signal.

Copilot uses AI. Check for mistakes.
return [];
}
},
// Enable streaming for action execution in multi-step mode
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The comment states 'Enable streaming for action execution in multi-step mode', but the code passes the streaming callback unconditionally (not checking if we're in multi-step mode). The comment should either clarify this is always enabled regardless of mode, or the code should conditionally pass it only in multi-step mode.

Suggested change
// Enable streaming for action execution in multi-step mode
// Pass through optional streaming callback for action execution (used by multi-step mode)

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
).filter(
([, paramDef]) =>
paramDef !== null && paramDef !== undefined && typeof paramDef === 'object'
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The validation checks if paramDef is a non-null object, but ActionParameter is defined as an interface with specific properties (type, description, required). Consider adding stricter validation to ensure paramDef has at least the 'type' property, or checking if it conforms to the ActionParameter shape.

Suggested change
).filter(
([, paramDef]) =>
paramDef !== null && paramDef !== undefined && typeof paramDef === 'object'
).filter(([ , paramDef ]) =>
paramDef !== null &&
paramDef !== undefined &&
typeof paramDef === 'object' &&
'type' in paramDef &&
typeof (paramDef as ActionParameter).type === 'string'

Copilot uses AI. Check for mistakes.
Comment on lines +200 to +201
"action" Name of the action to execute after providers return (empty string "" if setting isFinish: true or no action needed).
"parameters" JSON object with exact parameter names and values for the action. Use empty object {} if the action has no parameters or no action is selected.
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The instructions say to use empty string "" for action when no action is needed, but also say to use empty object {} for parameters. This is inconsistent - consider using the same pattern (either both null/undefined or both empty string/object) for clarity.

Copilot uses AI. Check for mistakes.
@wtfsayo wtfsayo changed the title feat(core): enhance multi-step workflow with retry logic and parameter extraction feat(core): intelligent streaming retry with continuation and multi-step enhancements Jan 13, 2026
Updated prompt instructions for clarity on 'action' and 'parameters' usage. Improved action parameter validation in the bootstrap plugin to ensure 'type' is present and a string. Cleaned up provider timeout logic and comments in the default message service.
@claude
Copy link
Contributor

claude bot commented Jan 13, 2026

Claude finished @wtfsayo's task in 1m 59s —— View job


PR Review - Multi-Step Workflow Enhancements

Todo List:

  • Read CLAUDE.md for repo guidelines
  • Review changed files and understand implementation
  • Check previous review comments and what's been addressed
  • Verify test coverage and check for issues
  • Provide concise actionable feedback

Summary

This PR adds robust retry logic, parameter extraction, and streaming improvements to multi-step workflows. The implementation is well-structured with proper validation, exponential backoff, and comprehensive test coverage.

✅ Verified - All Previous Issues Addressed

Issue Status Location
JSON.parse null validation ✅ Fixed default-message-service.ts:1354-1356
Array validation consistency ✅ Fixed Both string (1356) and object (1384-1386) paths check !Array.isArray()
Parameter passing uses accumulatedState ✅ Fixed Line 1627 passes accumulatedState to processActions
Metadata collision avoided ✅ Fixed Uses _source/_timestamp (1413-1414)
formatActionsWithParams null safety ✅ Fixed Lines 26-40 validate parameters and filter invalid entries with type check
Parameters header validation ✅ Fixed Line 42 checks validParams.length === 0
Single-shot continuation streaming ✅ Fixed Line 1102 uses runWithStreamingContext
getStreamedText idempotency ✅ Fixed streaming.ts:87-91 accumulates flushed content
ReDoS vulnerability ✅ Fixed ResponseStreamExtractor.detectResponseStrategy() uses indexOf

✅ Implementation Quality

Retry Logic:

  • Configurable via MULTISTEP_PARSE_RETRIES and MULTISTEP_SUMMARY_PARSE_RETRIES
  • Bounded to 1-10 range with sensible defaults (5)
  • Exponential backoff: 1s, 2s, 4s... capped at 8s
  • Clear logging at each retry attempt

Parameter Extraction:

  • Handles JSON string parameters with proper try/catch
  • Handles object parameters directly
  • Validates non-null, non-array objects in both paths
  • Stores in state.data.actionParams AND action-specific namespace
  • Graceful degradation on invalid input

Streaming Infrastructure:

  • New createStreamingContext() helper with retry state management
  • IStreamingRetryState interface for intelligent retry decisions
  • Proper reset() and flush() methods on extractors
  • getStreamedText() accumulates flushed content for consistent results

✅ Test Coverage (Comprehensive)

  • 19+ tests in multi-step.test.ts covering:
    • Retry logic: success after retries, failure after max retries
    • Summary fallback response when parsing fails
    • Parameter extraction from objects, JSON strings, invalid JSON
    • Edge cases: empty state, undefined content, callback errors
  • Uses bun:test correctly (per CLAUDE.md guidelines)
  • Streaming context tests with isolation verification

✅ Template Structure

The multiStepDecisionTemplate properly uses {{actionsWithParams}} (line 190) and includes valid JSON examples (lines 213-216) for parameter formatting.

💡 Minor Suggestions (Non-Blocking)

  1. Test helper metadata inconsistency (multi-step.test.ts:1092-1093): Uses source/timestamp instead of _source/_timestamp like the actual implementation. Consider aligning for consistency, though this is test-only and doesn't affect functionality.

  2. Copilot bot comment on action normalization (default-message-service.ts:1333): The comment about empty string "" vs undefined is valid documentation feedback - the prompt says use "" but code normalizes to undefined. Both work correctly; this is just a clarity concern in the prompt instructions.

⚠️ Known Limitations (Acknowledged Out of Scope)

  • Streaming flag timing: Per previous reviewer discussion, the hasStreamedToUser flag timing is deferred to a future PR. Current behavior prevents duplicate output.
  • Partial streamed text on continuation failure: Marked as intentional design decision by reviewer (comment at line 1143).

Recommendation: ✅ APPROVE

The implementation is solid, all previous review concerns have been addressed, proper TypeScript types are used throughout, tests are comprehensive using bun:test, and builds succeed. This is a well-structured enhancement to the multi-step workflow system.


- Fix test helper metadata to use `_source`/`_timestamp` to match
  production code that uses underscore-prefixed properties to avoid
  collision with legitimate action parameters
- Update streaming callback comment for clarity (used by multi-step mode)
- Apply prettier formatting fixes
@claude
Copy link
Contributor

claude bot commented Jan 13, 2026

Claude finished @wtfsayo's task in 2m 4s —— View job


PR Review - Multi-Step Workflow Enhancements

Todo List:

  • Read CLAUDE.md for repo guidelines
  • Review previous comments to avoid duplicate issues
  • Read key changed files for context
  • Verify test coverage and build compliance
  • Check for security issues and type safety
  • Provide final review with actionable feedback

Summary

This PR adds intelligent streaming retry logic, parameter extraction, and multi-step workflow improvements. The implementation is solid with proper validation throughout.

✅ Verified - All Requirements Met

Requirement Status
Uses bun:test (not jest/vitest) ✅ All 12 test files use bun:test
No npm/pnpm/yarn commands
TypeScript types (no any in impl) ✅ Core files properly typed
Test coverage ✅ 19+ comprehensive tests
Security (ReDoS fix) indexOf used instead of regex (streaming.ts:479-492)
@elizaos/core imports ✅ Correct import pattern

✅ All Previous Review Issues Addressed

Issue Status Location
JSON.parse null validation ✅ Fixed default-message-service.ts:1354-1356
Array validation consistency ✅ Fixed Both paths check !Array.isArray()
Parameter passing uses accumulatedState ✅ Fixed Line 1629
Metadata collision avoided ✅ Fixed Uses _source/_timestamp
formatActionsWithParams null safety ✅ Fixed Lines 26-40 validate params + filter invalids
Parameters header validation ✅ Fixed Line 42 checks validParams.length === 0
Single-shot continuation streaming ✅ Fixed Line 1102 uses runWithStreamingContext
ReDoS vulnerability ✅ Fixed Uses indexOf for actions detection

✅ Implementation Quality

Retry Logic (default-message-service.ts):

  • Configurable via MULTISTEP_PARSE_RETRIES (bounded 1-10, default 5)
  • Exponential backoff: 1s, 2s, 4s... capped at 8s
  • Clear logging at each retry attempt

Parameter Extraction (default-message-service.ts:1349-1420):

  • Handles JSON strings and objects
  • Validates non-null, non-array in both paths
  • Graceful degradation with warnings on invalid input

Streaming Infrastructure (streaming.ts):

  • createStreamingContext() with retry state management
  • IStreamingRetryState interface for intelligent decisions
  • flush() method for incomplete stream recovery
  • getStreamedText() accumulates flushed content correctly

Actions Provider (actions.ts:20-58):

  • formatActionsWithParams() validates parameter schemas
  • Filters invalid params before iterating
  • Handles missing/null parameter definitions

💡 Minor Non-Blocking Observations

  1. Test helper metadata (multi-step.test.ts:1094-1098): Uses _source/_timestamp correctly matching production code ✅

  2. Copilot comment on action normalization (default-message-service.ts:1333): The prompt instructs LLM to use "" but code normalizes to undefined. Both work correctly - this is just a documentation clarity point, not a bug.

⚠️ Known Limitation (Acknowledged Out of Scope)

Streaming flag timing (default-message-service.ts:1540): The hasStreamedToUser flag timing was explicitly marked as out of scope per reviewer discussion. Current behavior prevents duplicate output which is the preferred trade-off.

Recommendation: ✅ APPROVE

The implementation is robust, all previous review concerns have been addressed, proper TypeScript types are used throughout, tests are comprehensive using bun:test, and builds succeed. This is a well-structured enhancement to the multi-step workflow system.


@wtfsayo wtfsayo merged commit 261df48 into develop Jan 13, 2026
19 checks passed
@wtfsayo wtfsayo deleted the feature/multi-step-enhancements branch January 13, 2026 15:54
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.

6 participants