feat: add CLI commands for inspecting and replaying session logs#260
Merged
Conversation
- Flip ARES_SESSION_LOG_ENABLED default to true so JSONL session logs
land at ~/.ares/sessions out of the box; explicit opt-out remains via
ARES_SESSION_LOG_ENABLED=0.
- Add SessionLogConfig::default_root() so external callers can resolve
the same path the agent loop writes to without re-implementing env
parsing.
- Add `ares ops sessions {list,show,replay}` so operators can inspect
per-task session logs and reconstruct conversations through
replay_messages without poking around the filesystem.
- Serialize the env-mutating SessionLogConfig tests with a Mutex; the
new default-on path created a cross-test race when cargo's parallel
scheduler observed partial mutations.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #260 +/- ##
==========================================
+ Coverage 75.10% 75.12% +0.01%
==========================================
Files 383 384 +1
Lines 81465 81725 +260
==========================================
+ Hits 61188 61394 +206
- Misses 20277 20331 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
**Changed:** - Reformatted long function calls and argument lists to use multiple lines for better readability in `ares-cli/src/ops/sessions.rs` - Added a blank comment line for visual separation in doc comment block in `ares-llm/src/agent_loop/config.rs`
l50
added a commit
that referenced
this pull request
May 9, 2026
**Key Changes:** - Introduced `ares ops sessions` CLI commands for listing, showing, and replaying session logs - Added `SessionsCommands` enum and integrated it with the CLI and ops command dispatch - Implemented session log directory detection and defaulting logic for consistent CLI/file access - Updated dependencies and tests to support new session log features **Added:** - `SessionsCommands` enum to the CLI, enabling subcommands for listing operation/task IDs, showing session logs, and replaying conversations from logs - `sessions.rs` module in `ares-cli/src/ops` implementing the logic for the new CLI commands, including pretty-printing and JSON output - Integration of the new `ops sessions` subcommand into the main ops command handler - Test coverage for the new session log CLI features, including environment isolation and replay behavior - `tempfile` as a dev-dependency for test isolation and temporary directory management **Changed:** - Updated session log directory resolution in `ares-llm` to provide a `default_root()` helper for external consumers (such as CLI commands), ensuring consistent directory lookup - Improved environment variable handling for session log enablement in `SessionLogConfig`, making logging enabled by default unless explicitly disabled - Refactored and consolidated session log environment variable tests for thread safety and correctness - Updated action versions in GitHub workflow files for `actions/upload-artifact` and `actions/setup-go` to new commit SHAs - Bumped the Semgrep analysis container image to a newer version in CI workflow ---------
l50
added a commit
that referenced
this pull request
May 9, 2026
**Key Changes:** - Introduced `ares ops sessions` CLI commands for listing, showing, and replaying session logs - Added `SessionsCommands` enum and integrated it with the CLI and ops command dispatch - Implemented session log directory detection and defaulting logic for consistent CLI/file access - Updated dependencies and tests to support new session log features **Added:** - `SessionsCommands` enum to the CLI, enabling subcommands for listing operation/task IDs, showing session logs, and replaying conversations from logs - `sessions.rs` module in `ares-cli/src/ops` implementing the logic for the new CLI commands, including pretty-printing and JSON output - Integration of the new `ops sessions` subcommand into the main ops command handler - Test coverage for the new session log CLI features, including environment isolation and replay behavior - `tempfile` as a dev-dependency for test isolation and temporary directory management **Changed:** - Updated session log directory resolution in `ares-llm` to provide a `default_root()` helper for external consumers (such as CLI commands), ensuring consistent directory lookup - Improved environment variable handling for session log enablement in `SessionLogConfig`, making logging enabled by default unless explicitly disabled - Refactored and consolidated session log environment variable tests for thread safety and correctness - Updated action versions in GitHub workflow files for `actions/upload-artifact` and `actions/setup-go` to new commit SHAs - Bumped the Semgrep analysis container image to a newer version in CI workflow ---------
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
ares ops sessionsCLI commands for listing, showing, and replaying session logsSessionsCommandsenum and integrated it with the CLI and ops command dispatchAdded:
SessionsCommandsenum to the CLI, enabling subcommands for listing operation/task IDs, showing session logs, and replaying conversations from logssessions.rsmodule inares-cli/src/opsimplementing the logic for the new CLI commands, including pretty-printing and JSON outputops sessionssubcommand into the main ops command handlertempfileas a dev-dependency for test isolation and temporary directory managementChanged:
ares-llmto provide adefault_root()helper for external consumers (such as CLI commands), ensuring consistent directory lookupSessionLogConfig, making logging enabled by default unless explicitly disabledactions/upload-artifactandactions/setup-goto new commit SHAs