Skip to content

Commit ceaf8e1

Browse files
ooplesclaude
andcommitted
fix: resolve powershell parse errors and session file corruption
CRITICAL FIXES: 1. PowerShell Parse Error (lines 1598, 1620): - Changed $toolName: to ${toolName}: to avoid drive syntax interpretation - Prevents "Variable reference is not valid" errors - Script can now execute without syntax errors 2. Write-SessionFile Corruption Fix: - Initialize $fileStream = $null and $writer = $null at loop start - Add $writer.Dispose() in finally block - Increase ConvertTo-Json depth from default to 100 - Proper disposal order prevents 0-byte session files 3. Enhanced Debugging: - Added extensive Write-Host checkpoints in Handle-OptimizeToolOutput - Added script version logging - Added DIAGNOSTIC logs for optimize-tool-output action Root Cause Analysis (via Gemini CLI): - Each orchestrator invocation runs in NEW PowerShell process - No shared in-memory state between invocations - current-session.txt is ONLY mechanism for state sharing - Parse error prevented script execution entirely - Improper file disposal caused 0-byte session files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 31efcf3 commit ceaf8e1

File tree

1 file changed

+214
-92
lines changed

1 file changed

+214
-92
lines changed

0 commit comments

Comments
 (0)