Bash,
You will clear out through the Port Authority. Procedures will vary depending on the port. Call a few days ahead to make arrangements. You will also need to make plans for the other ports you will enter on the way back. Here is a link to a good cruising forum with contact information and general requirements for most of the ports that you might enter, and the perils you may encounter on the cruise back to the USA. Good luck. You are in for quite an adventure.
http://www.noonsite.com/Countries/CostaRica/PuertoLimon As far as entering CR, I have only been asked to show proof of a return ticket once in my thirty trips. The immigration agent appeared to be training a new agent and gave me a hard time and asked many questions while the new guy watched. Since then, I have been checked in by that same agent with no problems.
Your airline will probably not let you board without a ticket back. I occasionally buy two one-way tickets and they always ask about my return plans at check-in. Always bring proof of purchase of a ticket back out of CR. If you go to CR often then you could buy a one-way return ticket up to 90 days from your flight in and show that at check-in. At a later date you could couple it with another one-way ticket into CR.
LG -