chrisbanes / chrisbanes/ensemble
Session resume for retry continuity
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11
- Forks
- 0
- Avg merge
- 23h 12m
- Merged PRs (30d)
- 84
Description
Problem
Ensemble creates a fresh ACP session per run. When a step fails and needs retry, the agent loses all context from the previous attempt. This wastes tokens and may cause the agent to repeat work.
Paseo supports loadSession and resumeSession for session persistence across restarts. The ACP protocol provides session/load and session/resume methods.
Solution
Implement session resume:
- Store session ID and persistence handle after session creation
- On retry, check if agent supports session resume
- If supported, use
session/loadorsession/resumeinstead ofsession/new - Replay conversation history to maintain context
Implementation
#91 is complete, so this can build on the SDK-backed ACP path.
Add to acp_client.rs:
pub struct SessionPersistenceHandle {
pub session_id: String,
pub provider: String,
pub metadata: HashMap<String, String>,
}
pub async fn run_acp_session_with_resume(
command: &str,
workspace_path: &Path,
prompts: Vec<String>,
resume_handle: Option<SessionPersistenceHandle>,
// ... other params
) -> Result<SessionResult, AgentError> {
// If resume_handle is Some, use session/load instead of session/new
}
Acceptance Criteria
- Session persistence handle defined
- Session handle stored after session creation
- Resume logic uses
session/loadwhen handle is available - Conversation history replayed on resume
- Tests verify session resume works with mock agent
- Config option to enable/disable session resume per agent
Effort
Large
Prerequisites
- #91 completed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with acp_client.rs and the SDK-backed ACP path from #91, then review how session creation currently stores its results and how mock-agent tests are structured. Trace the session/load and session/resume protocol methods, and verify that the completed work covers persistence handles, conversation replay, retry behavior, and the per-agent configuration option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100