You're only defining the session service in your first route. Any others don't have any idea about that identifier, so can't operate on it at all. Session data itself is persistent across requests, but not the actual creation of the service.
$app['session'] = new Symfony\Component\HttpFoundation\Session\Session(); $app['session']->start();
need to be moved outside of any route-specific configuration (usually into a configuration file such as
src/app.php, although your structure might be different).
$app['session'] will then be available to use in any of your routes/controller methods/etc.
You might also want to look into using the
SessionServiceProvider class instead, which will take care of registering this service and provide other useful benefits like saving the session at the end of the request/response cycle. See https://silex.symfony.com/doc/1.3/providers/session.html