[BUG] Cannot run Ralph script on Windows 11
- Dominant language
- PowerShell
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the Bug
After git cloning into my project, i try to run the batch file. I see "Starting Ralph for Windows..." and then a number of errors are thrown
## Environment
- **Windows Version**: Windows 11 pro v25H2
- **PowerShell Version**: 5.1.26100.7462
- **Agent**: ollama
- **Model**: Qwen3-coder:30B (I think? I couldn't see what part of the process defines the model to use)
## Steps to Reproduce
git clone repo
cd to Ralph directory
run .\ralph.bat ollama
## Expected Behavior
I don't know, I haven't had it run before, whatever should happen after "Starting Ralph for Windows..."
## Actual Behavior
A number of syntax errors are thrown:
At D:\Projects\Website\Ralph\scripts\ralph.ps1:972 char:21
+ ... e-Host "`nðŸ‘ï¸ Watch Mode - Monitoring Ralph activity..." -Foregr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The string is missing the terminator: '.
At D:\Projects\Website\Ralph\scripts\ralph.ps1:909 char:37
+ while ($iteration -le $MaxIter) {
+ ~
Missing closing '}' in statement block or type definition.
At D:\Projects\Website\Ralph\scripts\ralph.ps1:862 char:26
+ function Start-RalphLoop {
+ ~
Missing closing '}' in statement block or type definition.
At D:\Projects\Website\Ralph\scripts\ralph.ps1:736 char:26
+ function Invoke-APIAgent {
+ ~
Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
I have also tried running the ralph.ps1 script, and the ralph.ps1 script found in Ralph\Scripts. All produce the same errors
## Logs
I can't give you logs, there doesn't appear to be a .ralph directory, or any files generated called errors.log or activity.log anywhere in my project.
Error Log (.ralph/errors.log)
```
Paste error log contents here
```
Activity Log (.ralph/activity.log)
```
Paste relevant activity log here
```
## Configuration
ralph-config.json (remove sensitive data)
```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment": "Ralph for Windows - Multi-Agent Configuration",
"maxIterations": 20,
"warnThresholdPercent": 70,
"rotateThresholdPercent": 80,
"defaultAgent": "gemini",
"agents": {
"gemini": {
"type": "cli",
"command": "gemini",
"defaultModel": "gemini-2.5-pro",
"contextLimit": 1000000,
"description": "Google Gemini CLI - largest free context window"
},
"cursor": {
"type": "cli",
"command": "cursor-agent",
"defaultModel": "claude-sonnet-4-20250514",
"contextLimit": 100000,
"description": "Cursor CLI - multi-model support"
},
"openai": {
"type": "api",
"endpoint": "https://api.openai.com/v1/chat/completions",
"defaultModel": "gpt-4o",
"contextLimit": 128000,
"apiKeyEnvVar": "OPENAI_API_KEY",
"apiFormat": "openai",
"description": "OpenAI API - GPT-4, GPT-4o, o1"
},
"codex": {
"type": "api",
"endpoint": "https://api.openai.com/v1/chat/completions",
"defaultModel": "gpt-4o",
"contextLimit": 128000,
"apiKeyEnvVar": "OPENAI_API_KEY",
"apiFormat": "openai",
"description": "OpenAI Codex (now GPT-4) - code-optimized"
},
"ollama": {
"type": "api",
"endpoint": "http://localhost:11434/api/chat",
"defaultModel": "qwen3-coder:30b",
"contextLimit": 32000,
"apiFormat": "ollama",
"description": "Ollama - local models (CodeLlama, DeepSeek, etc.)"
},
"lmstudio": {
"type": "api",
"endpoint": "http://localhost:1234/v1/chat/completions",
"defaultModel": "loaded-model",
"contextLimit": 32000,
"apiFormat": "openai",
"description": "LM Studio - local models with OpenAI-compatible API"
},
"local": {
"type": "api",
"endpoint": "http://localhost:8080/v1/chat/completions",
"defaultModel": "default",
"contextLimit": 32000,
"apiFormat": "openai",
"description": "Generic local model server (LocalAI, vLLM, etc.)"
},
"network": {
"type": "api",
"endpoint": "",
"defaultModel": "default",
"contextLimit": 32000,
"apiFormat": "openai",
"description": "Network model - specify endpoint with -Endpoint"
},
"anthropic": {
"type": "api",
"endpoint": "https://api.anthropic.com/v1/messages",
"defaultModel": "claude-sonnet-4-20250514",
"contextLimit": 200000,
"apiKeyEnvVar": "ANTHROPIC_API_KEY",
"apiFormat": "anthropic",
"description": "Anthropic API - Claude models"
},
"azure": {
"type": "api",
"endpoint": "",
"defaultModel": "gpt-4o",
"contextLimit": 128000,
"apiKeyEnvVar": "AZURE_OPENAI_API_KEY",
"apiFormat": "azure",
"description": "Azure OpenAI - enterprise deployment"
},
"vscode": {
"type": "manual",
"defaultModel": "gemini-code-assist",
"contextLimit": 100000,
"description": "VS Code manual mode - Gemini Code Assist"
}
},
"modelAliases": {
"gpt4": "gpt-4o",
"gpt4o": "gpt-4o",
"gpt4-turbo": "gpt-4-turbo",
"claude": "claude-sonnet-4-20250514",
"sonnet": "claude-sonnet-4-20250514",
"opus": "claude-opus-4-20250514",
"gemini": "gemini-2.5-pro",
"gemini-pro": "gemini-2.5-pro",
"gemini-flash": "gemini-2.5-flash",
"codellama": "codellama:13b",
"deepseek": "deepseek-coder:33b",
"llama": "llama3:8b"
},
"paths": {
"taskFile": "RALPH_TASK.md",
"ralphDir": ".ralph",
"scriptsDir": ".ralph-scripts"
},
"git": {
"autoCommit": true,
"commitPrefix": "ralph:",
"autoPush": false
},
"logging": {
"verbose": false,
"logToolCalls": true,
"logTokenUsage": true,
"saveResponses": true
},
"gutterDetection": {
"enabled": true,
"repeatThreshold": 3,
"fileThresholdCount": 5,
"fileThresholdMinutes": 10
},
"api": {
"timeout": 300,
"maxTokens": 4096,
"temperature": 0.7,
"retryAttempts": 3,
"retryDelaySeconds": 5
}
}
```
## Additional Context
Add any other context about the problem here.
Contributor guide
Research direction
Start by running .\ralph.bat ollama and inspect scripts\ralph.ps1 around line 972, where PowerShell reports the unterminated string; compare this with direct .\ralph.ps1 execution. Done means the script parses and proceeds past “Starting Ralph for Windows...” on Windows PowerShell 5.1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100