Everyone from college students to mid-career professionals looking for a job change have been told they need to learn how to code. And despite outright detractors and calls for moderation from inside the tech sector, a glut of coding schools has flooded the job market with junior developers.

You’d think that would be good news for tech companies, which now have their pick of newly minted talent. But in many cases it can actually make it harder to develop and maintain a deep bench of tech talent at the senior level–folks who actually stick around, mentor newcomers, and solve the really hairy technical problems more inexperienced coders often can’t.

Too often, the tech industry’s usual slate of perks doesn’t have as much impact when it comes to retaining the most top-shelf, experienced talent. As Stack Overflow COO Jeff Szczepanski wrote for Fast Company recently, “developers care about learning and growing,” but training and professional development aren’t exactly the first things hot new startups rush to talk about when asked about their cultures. In order to stick around, great developers need real career paths; in other words, not just a “hot” job. Here’s a look at a few reasons why your best tech talent might be contemplating an exit, and what it takes to prevent that.

You Waited Until The Exit Interview To Ask What’s Wrong

The fun of solving problems and the joy of seeing something they’ve built come to life is what drives many software developers. Companies need to leave room for the best of them to keep conceiving of–and then executing–new ideas. “If someone who’s been coming to you with their ideas suddenly stops, it’s a huge sign they’re on the way out the door,” says technology consultant Jason Cole, who advises small businesses on their engineering teams. “If you have someone saying, ‘I’m bored’ and you don’t do something about it, expect them to leave for a place where they won’t be bored.”

These issues don’t usually crop up until somebody’s given their notice and you’re holding an exit interview. But that always means the information you could’ve used to get ahead of the problem arrives too late. That’s why tech leaders should consider holding “stay interviews” with their most valued developers. When the ideas stop flowing or productivity sinks, it’s usually a sign you need to have this type of proactive sit-down.

Diane Scarborough, most recently the interim VP for People and Culture at Sprint Connect, says she’s learned to spot these changes in behavior, however subtle, and unearth unspoken complaints before it’s too late. When talking with team members, she probes for a longing to work on newer technologies and listens for any mentions of friends at other companies working on different projects. Even if these remarks are only made off-handedly, she knows they can be red flags. “Don’t be afraid to ask people questions,” she advises: “Are you happy? What’s making you stay? What would make you leave?”

She adds, “Asking ‘Are you okay?’ isn’t illegal.”