Plenty of non-agency roles on smaller codebases out there. Even at large companies you can work on product-specific teams with smaller codebases or in companies with a service-oriented architecture where you only need to understand one service. Lots of smaller orgs with similarly smaller codebases. Just about any pre Series A startup is also going to have a fairly small codebase as well.
As to sticking it out, really depends on if you want to learn to be good at this particular codebase or not. If you are miserable, then find another opportunity (while opportunities are still in good supply). Don't force yourself through something just to satisfy others's perception of you or your own self-perception.
As to sticking it out, really depends on if you want to learn to be good at this particular codebase or not. If you are miserable, then find another opportunity (while opportunities are still in good supply). Don't force yourself through something just to satisfy others's perception of you or your own self-perception.