upvote
whats the need? you have the session in a file as a dag. you can summarize to a log whenever you want. doesnt need to be as it goes.

earlier today i actually spent a bit of time asking claude to make an mcp to introspect that - break the session down into summarized topics, so i could try dropping some out or replacing the detailed messages with a summary - the idea being to compact out a small chunk to save on context window, rather than getting it back to empty.

the file is just there though, you can run jq against it to get a list of writes, and get an agent to summarize

reply
i dont work in just one session though. some tasks take me days and many sessions. also what happens when your session compacts. I am not sure what you are suggesting here. what do you do with these summarized topics from your session.

Also i want ci to resume my task from log and do code review with that context.

https://www.anthropic.com/engineering/effective-harnesses-fo...

"Read the git logs and progress files to get up to speed on what was recently worked on."

reply
I imagine you can do this with a hook that fires every time claude stops responding:

https://code.claude.com/docs/en/hooks-guide

reply
Backup your config and ask Claude. I’ve done this for all kinds of things like mcp and agent config.
reply
use claude hooks - in .claude/settings.json you can have it run on different claude events like "PreToolUse" or "Stop" and in those events you pass in commands you want it to run.

You can have stuff like for the "stop" event, run foobar.sh and in foobar.sh do cool stuff like format your code, run tests, etc.

reply