Before working with Agence, ensure you have:
wsl --install -d Ubuntu-22.04 (or LTS variant)wsl -l -v should show Ubuntu with Version 2ms-vscode-remote.remote-wslwsl sudo apt update && sudo apt install -y git
wsl curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
wsl sudo apt install -y nodejs
All Agence operations assume POSIX-compatible paths:
/workspace/...)/home/user/... via WSL)realpath() (POSIX-native)Incompatible shells introduce path normalization bugs that cascade into:
Configure VSCode to use WSL-Ubuntu bash by default:
terminal.integrated.defaultProfileWSL-UbuntuOr edit .vscode/settings.json directly:
{
"terminal.integrated.defaultProfile.windows": "WSL-Ubuntu",
"terminal.integrated.profiles.windows": {
"WSL-Ubuntu": {
"path": "C:\\Windows\\System32\\wsl.exe",
"args": ["--distribution", "Ubuntu", "--cd", "~"],
"icon": "terminal-ubuntu",
"problemMatcher": []
}
},
"terminal.integrated.fontFamily": "Cascadia Code",
"terminal.integrated.fontSize": 12
}
Verify:
# Open new VSCode terminal (Ctrl+`)
echo $SHELL
# Output: /bin/bash
pwd
# Output: /home/username/... (not C:\Users\...)
If you prefer PowerShell but need POSIX paths:
wsl sudo apt install -y powershell
Then use in VSCode:
wsl pwsh
Why this works:
/home/user/... (not C:\...)NOT Recommended:
C:\Program Files\Git\bin\bash.exe)# Clone repo (in WSL-Ubuntu bash)
git clone https://github.com/l-agence/agence.git
cd agence
# Initialize Agence
bash bin/agence ^init
# Check version
bash bin/agence version
# Test commands
bash bin/agence ^plan list
bash bin/agence ^todo list
bash bin/agence help
# All should succeed with no path errors
# Set your identity
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Enable long filenames (Windows can have issues)
git config --global core.longpaths true
# Configure line endings (LF inside WSL)
git config --global core.safecrlf warn
Solution:
.vscode/settings.json has defaultProfile.windows: "WSL-Ubuntu"Ctrl+Shift+P → “Developer: Reload Window”)Ctrl+\`)echo $SHELL → /bin/bashagence: command not foundSolution:
# Ensure you're in WSL-Ubuntu bash
echo $SHELL # Should be /bin/bash
# Ensure you're in agence directory
pwd # Should end with /agence
# Try with explicit bash
bash bin/agence --help
C:\Users\... in TerminalSolution:
wsl pwsh insteadSolution:
# Inside WSL-Ubuntu, verify POSIX symlinks work
ln -s /tmp/test.txt /tmp/test-link
ls -l /tmp/test-link # Should show: /tmp/test-link -> /tmp/test.txt
# If this fails, reinstall WSL2 or enable seLinux
Solution:
# Inside WSL-Ubuntu, ensure LF line endings
git config --local core.autocrlf input
# If files already have CRLF, fix them
dos2unix bin/agence
Agence agents run in Linux containers (v0.2.4+):
Container: /workspace/... (POSIX paths, Linux bash)
↑
Local WSL-Ubuntu: /home/user/... (POSIX paths, Linux bash)
↓
Git Bash local: /c/Users/... (MSYS2 emulation, fragile)
By using WSL-Ubuntu locally, you match the container environment exactly. This prevents:
Agence uses:
All of these work reliably in WSL-Ubuntu bash. PowerShell on Windows host creates translation layers that break assumptions.
Setup verified: 2026-03-31