Repository navigation
Description
Problem
After a reboot, crash, context compaction, or model handoff, a fresh agent session should be able to recover the work state for a task without rereading raw transcripts or relying on private scratch files.
Polylogue already stores the raw conversations and now has durable session products: profiles, enrichments, work events, phases, and work threads. The missing surface is a focused resume brief that composes those facts into an operator-safe handoff.
Strengthened scope
Build polylogue resume <session-id> as a typed product-backed command, not just a rendered transcript summary.
The first vertical slice should:
- resolve abbreviated or full conversation/session IDs through the existing repository lookup path;
- build a
ResumeBriefdomain object in the archive/product layer before adding CLI rendering; - include target-session facts: ID, provider, title, timestamps, parent/continuation metadata, message count, repository/path signals, branch names, tags, tool counts, and last-message state;
- include semantic evidence when available: session profile, enrichment intent/outcome/blockers, work events, phases, and matching work-thread context;
- distinguish evidence categories explicitly: facts from stored conversation rows, inferred state from session products, and uncertainty/next-step candidates;
- include nearby related sessions from the same thread/continuation path and same work-thread session IDs where available, while keeping the output compact;
- support
--json/root--format jsonfor machine handoff and a readable plain renderer for human terminal use; - degrade clearly when session products are not materialized, with repair guidance rather than traceback or silent omission;
- avoid network access, live provider calls, or private scratch/log dependencies.
Non-goals
- Do not solve the broader session-cluster research problem in [research] Session-cluster / work-thread concept — group conversations on same task #313.
- Do not add LLM summarization or generated claims in this slice.
- Do not invent a new persistent table unless the existing conversation rows and session products are insufficient.
Relation
Adjacent to #313, which models richer session clusters and work threads. This issue should land the resume-first vertical slice using existing thread/product evidence, leaving richer clustering heuristics for later.
Acceptance criteria
polylogue resume <session-id>returns a concise handoff brief for a known archived session.polylogue --format json resume <session-id>emits a stable JSON envelope withfacts,inferences,related_sessions,uncertainties, andnext_stepsfields.- The plain output names facts and inferred state separately and includes the likely next step when evidence supports one.
- Missing session-product rows produce an explicit availability/repair note instead of failing the whole command.
- Tests cover an interrupted/continued work fixture, a normal single-session fixture, JSON output, missing-session behavior, and product-unavailable degradation.
- Generated CLI docs, terminal snapshots, and command/proof catalog surfaces are refreshed.
Activity
Sinity commentedon Apr 23, 2026
Execution start log:
I strengthened the issue before implementation per the current directive. The widened target is now a typed product-backed resume brief rather than a one-off text renderer.
Initial implementation stance:
I am starting from fresh and will open a focused PR for #309.
Sinity commentedon Apr 23, 2026
Implemented in PR #379.
Execution notes:
ResumeBriefassembly layer inpolylogue/archive_resume.pyinstead of rendering transcripts directly from the CLI.ArchiveOperations, the facade, andpolylogue resume <session-id>with plain and JSON output.session_ids.Verification recorded on the PR: final
devtools verifypassed, focused resume/help tests passed, showcase baselines matched, generated surfaces were in sync, and the push hook quick baseline passed.feat: add product-backed resume briefs (#379) (#379)