That's bizarre. Do you maybe have something in .ssh/config files?
Try executing
ssh-add ~/.ssh/id_rsa
when arriving on your desktop
EDIT:
And if it does not try eval ssh-agent -s
first.
Since that worked:
-A
means "connect to auth agent". Your gateway certainly needs the auth agent to be running on your desktop in order to forward your connection to the protected host. The auth agent is probably launched automatically when you log in on your desktop with your graphical interface, but apparently when you log in using ssh it doesn't work like you want (it only takes your home key and ssh-add doesn't work). So you launch a new one and connect to it, add your key, and it works.
You could probably simplify a bit and replace
home$ ssh -i .ssh/loac_id_rsa user@main desk$ eval `ssh-agent -s` desk$ ssh-add ~/.ssh/id_rsa desk$ ssh -A $GATEWAY "ssh $SERVER \"./myscript $OPTIONS\""
with
home$ ssh -i .ssh/loac_id_rsa user@main ssh-agent bash desk$ ssh-add ~/.ssh/id_rsa desk$ ssh -A $GATEWAY "ssh $SERVER \"./myscript $OPTIONS\""
or if you will be doing this regularly you could play around with the contents of ~/.ssh/rc
(be careful though since if you break something maybe you will not be able to log in over ssh, you'll have to repair by logging in on the console).