Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
After restoring files from GitHub, Cursor’s chat window fails to capture Node.js stdout/stderr output. Tests execute correctly in local PowerShell terminal but produce no visible output in chat window.
Steps to Reproduce
- Restore files from GitHub (e.g.,
git restoreorgit checkout) - Run a Node.js test script via chat:
node test/utils/blockchain/test-block-confirmation-manager-unit.js - Observe: No output appears in chat window
- Run same command in PowerShell terminal
- Observe: Full output appears correctly
Expected Behavior
Output should appear in chat window, matching what appears in local terminal.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.1.50 (system setup)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.19045
For AI issues: which model did you use?
Auto, Composer 1
Additional Information
Output Capture Issue - Summary & Recommendations
Issue Confirmed
After comprehensive investigation, the issue is confirmed to be tool-specific output capture, not a code problem.
Evidence
-
Tests work perfectly in local PowerShell terminal- Full output visible (34 tests, all console.log statements)
- Proper exit codes
- Complete test execution
-
Tool’s chat window does not capture output- Same commands produce no visible output in chat
- Affects all Node.js scripts after GitHub restore
- Previously working tests also affected
-
Git configuration normalized- Set
core.autocrlf = false - Set
core.eol = lf - Renormalized line endings with
git rm --cached -r .andgit reset --hard
- Set
Root Cause
This is a tool/environment interaction issue where:
- The tool’s process execution mechanism fails to capture Node.js stdout/stderr
- This occurs specifically after GitHub restore operations
- The issue persists even after Git configuration fixes
- Local terminal execution works correctly, confirming code is fine
Recommended Actions
Immediate Workaround
Run tests directly in PowerShell terminal (confirmed working):
# Individual test
node test/utils/blockchain/test-block-confirmation-manager-unit.js
# All blockchain unit tests
Get-ChildItem test/utils/blockchain/*-unit.js | ForEach-Object {
Write-Host "`n=== Running $_ ===" -ForegroundColor Cyan
node $_.FullName
}
# Or use existing test runners
node scripts/ci-cd/run-ci-tests.js
Alternative: Output to File
If you need to review output in the tool:
node test/utils/blockchain/test-block-confirmation-manager-unit.js > test-output.txt 2>&1
# Then read the file in the tool
Long-term Solution
- Report as tool issue: This appears to be a bug in the tool’s output capture mechanism
- Use local terminal: Continue running tests directly in PowerShell for now
- Monitor for updates: Tool may fix this in future versions
Files Investigated
.gitattributes- Correctly configured (*.js text eol=lf)
Git config - Normalized to match .gitattributes
Test files - All use correct process.exit()pattern
Working tests (arbitrage, accounting) - Same pattern, also affected
Diagnostic scripts - Also affected, confirming systemic issue
Conclusion
The test code is correct. The issue is with the tool’s ability to capture Node.js output after GitHub restore operations. Use local terminal execution as the workaround until the tool’s output capture is fixed.
Related Documentation
docs/testing/GITHUB_RESTORE_OUTPUT_ISSUE.md- Detailed investigationdocs/testing/OUTPUT_CAPTURE_FIX.md- Previous (incorrect) hypothesis aboutprocess.exit()
Does this stop you from using Cursor
No - Cursor works, but with this issue