Skip to content

feat(ux): session recap — /recap command and auto-summary on resume#3136

Merged
bug-ops merged 1 commit intomainfrom
session-recap-multi-session
Apr 17, 2026
Merged

feat(ux): session recap — /recap command and auto-summary on resume#3136
bug-ops merged 1 commit intomainfrom
session-recap-multi-session

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 17, 2026

Summary

  • Adds /recap slash command that generates a brief summary of the current session on demand
  • Auto-shows a recap banner when returning to an existing conversation (gated on session.recap.on_resume + persisted digest)
  • New [session.recap] config section: on_resume, max_tokens, provider, max_input_messages
  • C3-bis fix: load_and_cache_session_digest now always loads when conversation_id exists; context injection remains gated on memory.digest.enabled to avoid regression
  • format_and_sanitize_conversation helper shared across all three digest paths (credential redaction + injection-pattern stripping before LLM)
  • /recap error path surfaces a neutral scrubbed message; auto-resume errors swallowed with tracing::warn!

Issues

Closes #3064
Related: #3130 (TUI multi-session groundwork, deferred from #3057)

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — zero warnings
  • cargo nextest run --workspace --all-features --lib --bins — 8243 passed
  • Live session test per .local/testing/playbooks/session-recap.md:
    • Start session, send a few messages, exit
    • Resume the same session — verify recap banner appears before first prompt
    • Type /recap mid-session — verify on-demand recap emitted
    • Set session.recap.on_resume = false — verify banner suppressed on resume
    • Disable memory.digest.enabled — verify digest not injected into context

Implements issue #3064. When returning to an existing conversation,
Zeph now generates a brief recap before accepting input. The /recap
slash command triggers an on-demand summary at any time.

Key changes:
- New [session.recap] config section (on_resume, max_tokens,
  recap_provider, max_input_messages) wired via AgentSessionConfig
- generate_recap_text / build_recap reuse session_digest pipeline
- Auto-recap gated on conversation_id + cached_session_digest presence,
  not message count; errors swallowed silently with tracing::warn!
- /recap command registered in agent registry; command path surfaces
  a neutral scrubbed error message on failure
- C3-bis fix: load_and_cache_session_digest always loads when
  conversation_id is set; context/assembly injection still gated on
  digest_config.enabled to avoid regression
- format_and_sanitize_conversation helper (scrub_content +
  ContentSanitizer) shared across all three digest paths
- --init wizard step for new recap options
- --migrate-config step (idempotent)
- Live testing playbook and coverage-status entry added

Closes #3064
Related: #3130 (deferred TUI multi-session groundwork from #3057)
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate config Configuration file changes enhancement New feature or request size/XL Extra large PR (500+ lines) labels Apr 17, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 17, 2026 20:45
@bug-ops bug-ops merged commit f3ccf0e into main Apr 17, 2026
32 checks passed
@bug-ops bug-ops deleted the session-recap-multi-session branch April 17, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

research(ux): session recap — auto-summarize context when returning to an existing conversation

1 participant