I’m trying to find a reliable way to feed a rolling window of context (from a streaming log that rotates) to my chat session with the agent. This would speed the feedback loop for diagnosing issues.
Ex.
$ tail -F relative/path/to/some/log.log
The context would need to be a sliding window, ideally, to mimic a manual workflow of ‘tail -n 2000 /some/log.log | pbcopy’ and pasting into chat or redirecting to a temporary file which I would then add to chat context. I’ve had some intermittent luck with simply asking the model to tail the log explicitly, but it struggles in various ways (forgets quickly, opens new tail sessions repeatedly, forgets the full path the to log). I’ve tried rules as well and the behavior is the same as explicitly asking in the agent chat, except with the addition of an annoying apology for not having properly followed it’s own rule.
I repeat this process hundreds of times to steer the conversation and automating it would really help me remove that tedious, repetitive work. In my day to day non AI assisted world, I use ‘multitail’ in a side by side window to spot ‘Caused by’ in java stack traces that stream through logs. It’s pretty crucial.