I'm curious if there's a complement to this on the longer side. At what point is a person penalized in the hiring/interviewing process if they have been a single company too long? What is too long? What (if anything) should a person in this boat do to mitigate this? Does it pay to break up a 10 year service at a given company into a series of 3ish year roles in the company as if they were different jobs?
For permanent employees, the answer is 'yes', unfortunately.
In recruiting, optimal time for tenure is between 2-5 years - thought to be enough time to get substantive work done, remove most doubts on capability of working with others, demonstrate loyalty to the company, and reciprocal trust from employer back to you.
Any longer than you may start to move into institutionalised territory, especially if there has also been no career progression during that time. Over 10 years at the same employer, I think recruiters will make note of it, but not immediately reject. 15 years plus, and recruiters will look for others, whilst keeping you in a 'call later' pile.
This is all biased but shortcuts is what we need to do operate in the world. Advice for folks wanting to keep optimal market attraction - 2-5 years tenure on perm contracts
More generally, a long time ago I was advised to change up something about my job every two - three years — take on a new set of responsibilities, change teams, lead a community-of-interest group, etc. - to keep things fresh. I’ve found that to be good advice, both to avoid feeling like I’m not making any progress at work, and to avoid appearing to be unmotivated or inflexible. YMMV.
* Edit - I guess I should add I’m currently a people manager and even as an individual contributor did a lot of interviewing. *
Having said that, I've heard from multiple recruiters and other engineering leaders: you have to deprogram people with long Amazon tenure. I guess Amazon really does a number on people from warehouse to codebase.