Terminal Parsing Issues With Apostrophes In Paths

I’m tired of writing bug reports. Here’s the sixth problem with the terminal.

bugreport by code-supernova-1-million with my edits


Bug Report: PowerShell Syntax Error After Test File Creation

Summary

After creating test files for improving code coverage, the system began generating PowerShell syntax errors when executing any command, preventing normal operation.

Environment

  • OS: Windows 11
  • Shell: PowerShell 7.5.3
  • Project: Artemonim’s Chess Monorepo
  • Location: G:\GitHub\Artemonim's-Chess

Additional

  • RID: 1c3b6b32-be8f-4c38-abff-ee72d13b4579
  • Agent: code-supernova-1-million

Steps to Reproduce

  1. Initial State (Working): cd "G:/GitHub/Artemonim's-Chess/" && ./run.ps1 -SkipLaunch executed successfully, showing coverage report:

    Statements: 30.44% (1197/3932)
    Branches: 56.42% (211/374)
    Functions: 52.66% (89/169)
    Lines: 30.44% (1197/3932)
    
  2. Created Test Files for zero-coverage files:

    • Shared/src/contracts/engine.test.ts
    • Shared/src/contracts/protocols.test.ts
    • Shared/src/logging/TournamentLogger.test.ts
    • Shared/vite.config.test.ts
    • packages/Classic/src/debugOverlay.test.ts
    • packages/Classic/src/engine.config.test.ts
    • packages/Classic/vite.config.test.ts
    • packages/Classic/vite.config.analyze.test.ts
    • packages/Classic/vitest.config.test.ts
  3. Post-Creation State (Broken): Any subsequent command triggers PowerShell syntax error:

    ParserError: C:\Users\Artem\AppData\Local\Temp\ps-script-xxxxx.ps1:139
    Line |
    139 | Write-Host ("[TIMING] {0,-20}: {1,6:F3}s (total: {2,6:F3}…
         |                                        ~~~
         | Unexpected token ':F3' in expression or statement.
    

Expected Behavior

  • Commands should execute normally
  • Test files should be created without affecting system functionality
  • PowerShell should parse commands correctly

Actual Behavior

  • System creates temporary PowerShell scripts in AppData\Local\Temp
  • These scripts contain syntax errors with :F3 formatting strings
  • All command execution fails

Root Cause Analysis

The error suggests PowerShell is encountering a string formatting expression :F3 (format specifier for 3 decimal places) that it cannot parse correctly. This likely occurs when:

  1. One of the created test files contains a string that PowerShell misinterprets
  2. An existing file contains problematic PowerShell-like syntax
  3. The system’s command wrapper is incorrectly processing file contents

Files Modified

Created the following test files to improve coverage from 30.44% to target 75%:

  • Contract interfaces tests (engine.ts, protocols.ts)
  • Logger tests (TournamentLogger.ts)
  • Configuration tests (vite.config.ts, vitest.config.ts)
  • Component tests (debugOverlay.ts, engine.config.ts)

Workaround Attempts

  • Direct Node.js execution: node -e "console.log('test')" - fails
  • Path navigation: cd "path" - fails
  • Command variations - all fail with same error

Impact

  • Cannot run tests or build process
  • Cannot verify coverage improvements
  • Development workflow blocked

Severity

High - Complete blockage of development workflow

Suggested Investigation

  1. Search all files for :F3 patterns
  2. Check temporary PowerShell scripts in AppData\Local\Temp
  3. Review created test files for PowerShell-like syntax
  4. Test if removing recent test files resolves the issue

Temporary Solution

May need to delete created test files and recreate them to isolate the problematic content.

@condor @deanrie Can I get some help with at least one of the six bug reports listed almost two days ago, or all I can do is prohibit IDE updates and roll back to 1.6.x or 1.5.x until they become so outdated that Agent stops working in them?

I just upgraded to 1.7.17 and Agent still runs its console outside of the workspace, which prevents it from working, as my workflow with Agent is based around working with the terminal.

I could try to convert the scripts that are important to me to work via MCP, but I do not know which models work with MCP and which do not, since working with MCP has been partially broken since at least July and I still see bug reports on this topic.

Hi @Artemonim sure, I will have to split some of the reports. Will respond today.

Thanks for the 1/6 answer. For me, this is the most pressing problem, because it makes Cursor completely inoperable for me:

I would like to get a hotfix or advice on how to temporarily bypass this.

@condor There is no problem with launch scripts in another project. Maybe the symbol in path make the terminal crazy?

[4 tools called]

## Report

Both scripts were successfully created and executed.

**Changes Made:**
- Created `simple_powershell.ps1` in the project root with a basic PowerShell script that outputs "Hello from PowerShell script!"
- Created `simple_python.py` in the project root with a basic Python script that prints "Hello from Python script!"

**Unfulfilled Tasks:**
None

**Manual Changes Required:**
None

**Special Attention Required:**
None

**Rationale for significant deviations:**
None - followed standard practices for creating simple scripts.

That is very likely. I havent seen the report elsewhere.

Yep. That’s it. Tell the developers about the problem, and for now I’ll just rename the project…


[17 tools called]

Report

I encountered issues with executing commands in folders containing apostrophes due to terminal parsing problems.

Changes Made:

  • Created folder named test'folder in the project root
  • Created simple_powershell.ps1 inside the folder with a modified message
  • Created simple_python.py inside the folder with a modified message

Unfulfilled Tasks:

  • Unable to execute scripts from within the folder due to terminal parsing errors when handling paths with apostrophes
  • Could not successfully change directory to the folder and run scripts from there

Manual Changes Required:
None

Special Attention Required:
The apostrophe character in folder names causes parsing issues in PowerShell/cmd terminals. Scripts work when called from the parent directory, but fail when attempting to navigate into the folder or execute from within it.

1 Like

Thank you for testing! Sending it to the team.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.