Craft 2 CP session expires unexpectedly, requires repeated login Environment
Craft: 2.6.3013 (Personal)
MAMP Pro: 4.4.1
PHP: 7.0.12 (CGI Mode)

Behavior
After logging into the CP, and following a relatively short period of time, the session expires unexpectedly and Craft requests a login. Attempting to log in fails and immediately returns to the login modal; however, simply refreshing the page re-establishes the session, but again for only the limited period of time.

Looking at /craft/storage/runtime/sessions I see that Craft is creating a number of sessions, some of them being zero bytes.

Attempted Solutions
I've tried the following, based on other users' past experiences and solutions:


In general.php: 'requireMatchingUserAgentForSession' =&gt; false 
In general.php: 'overridePhpSessionLocation' =&gt; true
In php.ini: session.auto_start = 0
Permissions set to 777 for /craft/storage/runtime
In MAMP, enable/disable "Xdebug (Debugger)" PHP extension
Lastly, tested in both PHP 7.0.12 and 5.6.32 without CGI mode


Next Steps?
Does it appear that I've missed anything in my previous steps? I've been using Craft 2 for a couple of years in a variety of environments--MAMP 3 / Vagrant / Docker--and haven't experienced this before. The issue isn't a showstopper, but certainly an annoyance, and I would be grateful for thoughts on what to try next.
Resolved.

This ended up being an issue with, so far as I can tell, my env variables--specifically a misconfiguration with the basePath.