Description
The isValidMedia() function in src/media/parse.ts (compiled: dist/media/parse.js) only accepts paths starting with /, ./, ../, ~, or http(s)://. On Windows, paths like C:\Users\... or C:/Users/... are rejected, making it impossible for CLI backends (like claude-cli) to send media back via MEDIA: tokens.
Current behavior
// Windows paths fall through to `return false`
function isValidMedia(candidate, opts) {
if (/^https?:\/\//i.test(candidate)) return true;
if (candidate.startsWith("/")) return true;
if (candidate.startsWith("./")) return true;
if (candidate.startsWith("../")) return true;
if (candidate.startsWith("~")) return true;
return false;
}
When a CLI backend on Windows outputs MEDIA:C:\Users\path\to\image.jpg, the parser silently drops the token and no media is sent.
Expected behavior
Windows absolute paths (e.g. C:\..., D:/...) should be recognized as valid media paths.
Suggested fix
Add a check for Windows drive-letter paths:
// Match drive letters like C:\ or C:/
if (/^[a-zA-Z]:[/\]/.test(candidate)) return true;
Environment
- Windows 11
- Clawdbot 2026.1.24-3
- Backend: Claude Code CLI (
claude-cli/sonnet)
- Discord channel
Description
The
isValidMedia()function insrc/media/parse.ts(compiled:dist/media/parse.js) only accepts paths starting with/,./,../,~, orhttp(s)://. On Windows, paths likeC:\Users\...orC:/Users/...are rejected, making it impossible for CLI backends (likeclaude-cli) to send media back viaMEDIA:tokens.Current behavior
When a CLI backend on Windows outputs
MEDIA:C:\Users\path\to\image.jpg, the parser silently drops the token and no media is sent.Expected behavior
Windows absolute paths (e.g.
C:\...,D:/...) should be recognized as valid media paths.Suggested fix
Add a check for Windows drive-letter paths:
Environment
claude-cli/sonnet)