I had posted the bash one here before I just ran into some tcsh users that where having similar issues so I thought it might be helpful.
My .bashrc starts with the 2 lines
if [ "$BASH_EXECUTION_STRING" != "" ]; then return 0; fi # do not add items before this line
This helps with sftp and x2go if you have things that interfere with x2go or sftp like changing directories or adding paths that might interfere or just code block that might interfere.
for tcsh add the following 2 lines to the top of your .cshrc
if ( set |grep "^command.bash" |grep "X2GO"
!= "" ) exit
# do not add items before this line