Relationships
#4552 worker connect: a relative --cache-dir enrolls fine but every dispatch fails with 'Path must be absolute'
Opened by zack · 11/9/2026· Shipped 11/9/2026
Description
swamp worker connect --cache-dir <relative path> enrolls fine, but every step dispatched to that worker then fails with:
Path must be absolute: received "../wcache-new/bundles/<fingerprint>/bundle.js"worker connect passes --cache-dir (and SWAMP_WORKER_CACHE_DIR) through without resolving it (src/cli/commands/worker_connect.ts:199). The worker later builds a file URL for the cached bundle (toFileUrl(bundlePath) in src/worker/bundle_cache.ts), and toFileUrl refuses relative paths. swamp worker daemon enable already resolves its --cache-dir to an absolute path, so the two commands disagree.
Nothing fails at enrollment, so the worker shows as healthy in swamp worker list while every dispatch fails, and the error doesn't mention --cache-dir.
Steps to reproduce
swamp serve --port 19390in a repo, thenswamp worker token create w1 --duration 1h- From some directory:
swamp worker connect ws://127.0.0.1:19390 --token <token> --label e2e=yes --cache-dir ../wcache - Run a workflow with a step placed on that worker (
labels: { e2e: "yes" }) whose behavior comes from an extension bundle. - The step fails with
Path must be absolute: received "../wcache/bundles/.../bundle.js". Restarting the worker with an absolute--cache-dirfixes it.
Expected
worker connect resolves a relative --cache-dir / SWAMP_WORKER_CACHE_DIR against the working directory at startup, as worker daemon enable does. At minimum it should refuse a relative path at startup with a clear message.
Environment
- Found on the branch for swamp-club#4534 (HEAD ecf6c21b4); the code path is unchanged on main
- Linux x86_64
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.