Symlink resolution when restarting a workflow

I tried running your example and it failed for me:

[example] $ cd $(mktemp -d)
[tmp.uZZvZTW10O] $ mkdir example && cd example
[example] $ mkdir -p flow/bin
[example] $ echo "echo Hello" > script_real.sh
[example] $ chmod +x script_real.sh
[example] $ cd flow/bin
[bin] $ ln -s ../../script_real.sh script_real_SYMLK.sh
[bin] $ cd ..
[flow] $ cat > flow.cylc <<eod
> [scheduling]
>     cycling mode = integer
>     [[graph]]
>         R1 = do_stuff
> [runtime]
>     [[do_stuff]]
>         script=". script_real_SYMLK.sh; error"
> eod
[flow] $ cylc vip -N
$ cylc validate /var/tmp/tmp.uZZvZTW10O/example/flow
Valid for cylc-8.2.4
$ cylc install /var/tmp/tmp.uZZvZTW10O/example/flow
INSTALLED flow/run1 from /var/tmp/tmp.uZZvZTW10O/example/flow
$ cylc play -N flow/run1

 ▪ ■  Cylc Workflow Engine 8.2.4
 ██   Copyright (C) 2008-2024 NIWA
▝▘    & British Crown (Met Office) & Contributors

...

2024-03-08T16:24:39Z INFO - [1/do_stuff running job:01 flows:1] => failed
2024-03-08T16:24:39Z WARNING - [1/do_stuff failed job:01 flows:1] did not complete required outputs: ['succeeded']
2024-03-08T16:24:39Z ERROR - Incomplete tasks:
      * 1/do_stuff did not complete required outputs: ['succeeded']
2024-03-08T16:24:39Z CRITICAL - Workflow stalled
2024-03-08T16:24:39Z WARNING - P3D stall timer starts NOW
$ cylc cat flow//1/do_stuff -f e
/.../cylc-run/flow/run1/log/job/1/do_stuff/01/job: line 42: script_real_SYMLK.sh: No such file or directory
2024-03-08T16:24:38Z CRITICAL - failed/ERR

Which makes sense because the symlink does not resolve:

$ cat ~/cylc-run/flow/run1/bin/script_real_SYMLK.sh 
cat: /.../cylc-run/flow/run1/bin/script_real_SYMLK.sh: No such file or directory

I don’t understand how this works for you. I suspect you have something in your .bashrc or .bash_profile that is putting extra things into the $PATH maybe? Inspecting the environment may yield insights.

Well that could indeed explain it then ! But that’s very surprising for the user ^^

After investigation it looks like they are using the same working directory, so it isn’t that. So I’m not sure why this works for vip but not play, however, I don’t actually understand how this is working for you in the first place.