/shell-history command to show all shell commands run in session
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When working on a long coding session with Claude Code, I often want to review all the shell commands that were executed — for example, to understand what was changed (and that deletions as an examples - were done right), reproduce a sequence of steps, or write documentation. even when scrolling through the conversation, the commands are truncated in the UI and not fully visible, making it impossible to read them without clicking into each one individually.
Proposed Solution
A /shell-history slash command that prints a numbered list of all shell commands executed in the current session, in full (not truncated), in chronological order. Each entry could optionally include a short description of what the command did (since Claude already writes a description for bash calls).
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
I was working with Claude Code on a long session cleaning up a research repository before making it public. Claude deleted several folders and files across multiple steps — old website directories, zip files, build artifacts, etc. At the end of the session, I wanted to verify exactly what was deleted and in what order, to make sure nothing important was removed by mistake.
With the current UI, I had to scroll through a long conversation, and even then the commands were truncated so I couldn't see the full rm -rf commands. A /shell-history command would have let me instantly see the full list:
- rm -rf docs/
- rm -f old_docs.zip
- rm -rf website/ presentation/...
This would give me confidence that only the intended files were removed.
Additional Context
_No response_
3 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is distinct from the suggested duplicates. #7776 and #26304 are about persisting commands to the shell or across sessions. #61824 is about visibility in the TUI. My request is specifically for a /shell-history slash command that shows the full list of all commands Claude executed in the current session — useful for reviewing, auditing, or reproducing steps mid-session without scrolling through the entire conversation.
There's no dedicated command for this yet, but two things get you most of the way today:
Ctrl+Oto open the transcript viewer, which shows every tool call in full (untruncated Bash commands and their descriptions) in chronological order./exportwrites the whole conversation to a file, so you can grep it for the commands that ran.Leaving this open for a dedicated, numbered command list.
Docs: https://code.claude.com/docs/en/interactive-mode
🤖 Generated with Claude Code