Allow retry on initial prompt (#898)

Also allow followups when initial process didn't produce a session id.
This commit is contained in:
Solomon
2025-10-01 14:53:03 +01:00
committed by GitHub
parent b77abac0c3
commit ff2edd4c11
3 changed files with 39 additions and 39 deletions

View File

@@ -538,21 +538,6 @@ impl ExecutionProcess {
})
}
/// Require latest session_id for a task attempt; error if none exists
pub async fn require_latest_session_id(
pool: &SqlitePool,
attempt_id: Uuid,
) -> Result<String, ExecutionProcessError> {
Self::find_latest_session_id_by_task_attempt(pool, attempt_id)
.await?
.ok_or_else(|| {
ExecutionProcessError::ValidationError(
"Couldn't find a prior session_id, please create a new task attempt"
.to_string(),
)
})
}
/// Fetch the latest CodingAgent executor profile for a task attempt
pub async fn latest_executor_profile_for_attempt(
pool: &SqlitePool,