Feature request: save session summaries from /compact
First, let me just gush over how awesome Claude Code is. You guys are brilliant in building the ecosystem around the best coding model. The overall value is more than the sum of the parts.
I have spent significant time (and API fees!) in the last few days with Claude Code and have decided it is my preferred way to work. The /compact feature is awesome. I might use it two or three times per hour. The summary it produces is valuable history. Please provide a way to automatically save it as Markdown files with timestamps in the file name so that the chronological order is preserved when sorting alphabetically. Given that the files will have their own timestamp metadata, it may not be necessary to include the timestamp in the filename, but I think it will be useful anyway. Perhaps this preference should be configurable.
8 Comments
I'm using a home-baked solution by including the following in CLAUDE.md:
I also check this into my repo. Would be much better if were baked into Claude Code in a format that can be committed.
Plus one to this, I was think I wanted the exact same feature.
inspired by @coygeek 's solution in #1335, I wrote a script for interactive env.
add a script with chmod +x
then add a alias in you e.g. .zshrc, and source .zshrc
each time when you start claude code with this alias, it will firstly produce a session id from headless mode and update this session id into env variable, where other program in the same shell session can access this
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I believe it's not implemented yet. Let's keep the issue open for a few more months.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.