Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds tracking of user interaction timestamps to session state, enabling better visibility into when sessions were last actively used. The LastInteractionAt field is set when a session is first created and updated on every subsequent prompt submission. The status command now displays this information with a redesigned format that shows agent/ID/times on one line and the prompt on an indented second line, with "active X ago" shown when it meaningfully differs from the session start time (>1 minute).
Changes:
- Add
LastInteractionAtfield to session state structs and JSON serialization - Update
LastInteractionAton everyInitializeSessioncall in both auto-commit and manual-commit strategies - Redesign status output: agent/ID/times on line 1, prompt on indented line 2
- Add comprehensive unit and integration tests for the new field and status display
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/session/state.go | Add LastInteractionAt field to session State struct with documentation |
| cmd/entire/cli/strategy/manual_commit_types.go | Add LastInteractionAt field to strategy-specific SessionState struct |
| cmd/entire/cli/strategy/manual_commit.go | Add LastInteractionAt to conversion functions between strategy and session states |
| cmd/entire/cli/strategy/manual_commit_session.go | Set LastInteractionAt on new session initialization |
| cmd/entire/cli/strategy/manual_commit_hooks.go | Update LastInteractionAt on every subsequent prompt in existing sessions |
| cmd/entire/cli/strategy/auto_commit.go | Set and update LastInteractionAt in auto-commit strategy |
| cmd/entire/cli/status.go | Redesign status output format and display "active X ago" when meaningful |
| cmd/entire/cli/status_test.go | Add comprehensive tests for status output format and active time display logic |
| cmd/entire/cli/strategy/session_state_test.go | Add unit tests for LastInteractionAt JSON serialization round-trip |
| cmd/entire/cli/integration_test/last_interaction_test.go | Add integration tests verifying field behavior across strategies and checkpoint cycles |
0213adf to
256bf20
Compare
Update InitializeSession in both strategies to record LastInteractionAt on every user prompt submit. Display "active X ago" in status output when it meaningfully differs from session start time. Redesign session lines to show prompt on an indented second line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: f6a415abf2b0
The manual-commit strategy converts between strategy.SessionState and session.State via sessionStateToStrategy/sessionStateFromStrategy. The new LastInteractionAt field was missing from both converters, so it was silently dropped on every save/load cycle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 4a9c8e2bd824
Verify the field is set on first prompt, updated on subsequent prompts, and preserved across checkpoint cycles. Tests run for all strategies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33d94c8 to
b9a0419
Compare
…ack-last-interaction-for-sessions
georg
previously approved these changes
Feb 8, 2026
georg
approved these changes
Feb 8, 2026
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.
Summary
LastInteractionAttimestamp to session state, updated on everyInitializeSessioncall (user prompt submit)entire statuswhen it meaningfully differs from session start time (>1 min)LastInteractionAttosessionStateToStrategy/sessionStateFromStrategyconverters (manual-commit strategy uses a conversion layer betweenstrategy.SessionStateandsession.State)Stacked on #89
Test plan
LastInteractionAtJSON round-trip, status output format, active-time omission when close to startmise run fmt && mise run lint && mise run test:ciall pass🤖 Generated with Claude Code
Note
Low Risk
Mostly additive timestamp tracking and CLI output formatting, with good unit/integration test coverage; low risk aside from potential minor UI/regression in status output parsing.
Overview
Adds a new persisted session timestamp
LastInteractionAt, set on session creation and updated on everyInitializeSession/user prompt submit across bothauto-commitandmanual-commitstrategies (including manual strategy state conversions).Updates
entire statusactive session display to showstarted …plus an optional “active X ago” (only when meaningfully different from start), and reformats output to put agent/ID/times on the first line and the first prompt on an indented second line (omitting missing prompts).Adds unit and integration coverage for JSON round-tripping, status formatting/active-time omission, and interaction timestamp behavior across repeated prompts and checkpoint cycles.
Written by Cursor Bugbot for commit 7ad1fc5. This will update automatically on new commits. Configure here.