Skip to content

feat: add sessions read command to show full session history#20

Open
zerone0x wants to merge 1 commit intoopenclaw:mainfrom
zerone0x:feat/sessions-read-command
Open

feat: add sessions read command to show full session history#20
zerone0x wants to merge 1 commit intoopenclaw:mainfrom
zerone0x:feat/sessions-read-command

Conversation

@zerone0x
Copy link

Summary

Closes #16

Adds acpx <agent> sessions read as a user-friendly command to read the full session history without resuming the agent interactively.

Problem

Users asked for a way to see what the agent already did (sessions read or sessions history --tail). While sessions history exists, it defaults to the last 20 entries and has a less intuitive name for the "read my session" use case.

Changes

  • Adds sessions read [name] subcommand that shows all history entries by default
  • Supports --tail <N> flag to restrict output to the last N entries (mirrors the tail UX from the issue)
  • Updates printSessionHistoryByFormat to treat limit === 0 as "show all entries"
  • Reuses the existing handleSessionsHistory handler — no logic duplication

Usage

# Show all history for the current cwd session
acpx codex sessions read

# Show all history for a named session
acpx codex sessions read backend

# Show only the last 5 entries
acpx codex sessions read --tail 5

# JSON output
acpx codex sessions read --format json

🤖 Generated with Claude Code

Closes openclaw#16

Adds `acpx <agent> sessions read` as a user-friendly command to read
all session history entries without resuming interactively. Complements
the existing `sessions history` command (which defaults to last 20
entries) by defaulting to showing all entries.

Supports `--tail <N>` to restrict output to the last N entries.
Updates `printSessionHistoryByFormat` to treat limit === 0 as
"show all entries".

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command to read session content

1 participant