I think the user home directory is the default working directory for launch agents. Try it and see.
The fact that launchd agent property lists have no good way to specify home-relative paths is a well-known limitation. There are two ways you can deal with this:
Not print to
stderr— Daemons and agents are meant to be headless. We recommend that such programs log to the system logging facility, which is currently <os/log.h>.
stderryourself — If you absolutely have to print to
stderr, you can redirect them to a destination of your choice using
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"