I'm doing this with a remote VM on exe.dev and it's quite nice. Well, actually with their own coding agent but they have Claude Code preinstalled too.
Syncthing works well for getting a local copy of a directory from the VM.