I am running a long-running agent with a couple of subagents and after some of the run of the agent, it throws this error at me.
API Error: 400 Input is too long for requested model.
If I was dealing with it on Claude Code, I'd have probably compacted or something, but in a case where its non-human-in-the-loop, like mine, how do I handle this?
Do I need to use a hook or slash command. How do I trigger that?