When block streaming is enabled with verbose=off, tool blocks are hidden
but their boundary information was lost. Text segments before and after
tool execution would get coalesced into a single message because the
coalescer had no signal that a tool had executed between them.
This adds an onBlockReplyFlush callback that fires on tool_execution_start,
allowing the block reply pipeline to flush pending text before the tool
runs. This preserves natural message boundaries even when tools are hidden.
Fixes the issue where:
text → [hidden tool] → text → rendered as one merged message
Now correctly renders as:
text → [hidden tool] → text → two separate messages
Co-diagnosed-by: Krill (Discord assistant)
Windows system utilities like ipconfig, systeminfo, etc. write directly to
the console via WriteConsole API instead of stdout. When Node.js spawns
cmd.exe with piped stdio, these utilities produce empty output.
Changes:
- Switch from cmd.exe to PowerShell on Windows (properly redirects output)
- Disable detached mode on Windows (PowerShell doesn't pipe stdout when detached)
- Add windowsHide option to prevent console window flashing
- Update tests to use PowerShell-compatible syntax (Start-Sleep, semicolons)
Ensure 'main' alias is always stored as 'agent:main:main' to prevent
duplicate entries. Also update loadSessionEntry to check both forms
when looking up entries.
Fixes duplicate main sessions in session store.
The previous prompt was too permissive about skipping announcements.
Updated to strongly encourage announcing results since the requester
is waiting for a response.
- Add 'You MUST announce your result' instruction
- Clarify ANNOUNCE_SKIP is only for complete failures
- Improve guidance on providing useful summaries
The previous immediate probe (timeoutMs: 0) only caught already-completed
runs. Cross-process spawns need to actually wait via agent.wait RPC for
the gateway to signal completion, then trigger the announce flow.
- Rename probeImmediateCompletion to waitForSubagentCompletion
- Use 10 minute wait timeout for agent.wait RPC
- Remove leftover debug console.log statements
- Replace free functions with IncludeProcessor class
- Simplify IncludeResolver interface: { readFile, parseJson }
- Break down loadFile into focused private methods
- Use reduce() for array include merging
- Cleaner separation of concerns
- Move $include resolution to src/config/includes.ts
- Simplify io.ts by importing from includes module
- Cleaner API: resolveConfigIncludes(obj, configPath, resolver?)
- Re-export errors from io.ts for backwards compatibility
- Rename test file to match module name