Proposal: Make multi-phase flows resumable + resil...
# features-forum
f
Proposal: Make multi-phase flows resumable + resilient (health checks, circuit breaker, checkpointing) Summary Multi-phase tasks (e.g., Generate Plan, verification, long agent chains) fail hard when an intermediate step crashes or the LLM endpoint hiccups. On failure, Traycer restarts from scratch (repo discovery, indexing, etc.) - causes redundant API calls and wasted compute. Please consider health checks, circuit breaking, and checkpointed resumes so work isn’t lost and retries are sane. Environment Traycer VSCode: 2.9.11-win32-x64 Editor: Cursor (Windows 11) Workspace: large repo(s); sometimes on slower/remote storage Symptoms in logs: ripgrep process timed out / exited with code 2 SQLITE_BUSY + JSON parse errors on ReviewThreads/LostReviewThreads PlanGenerationFailedError: The LLM provider is unavailable Repro (typical) Start Generate Plan on a large repo. Traycer does N multi-step phases (discovery, indexing, agents run). IO stalls (ripgrep timeout) or LLM transient outage occurs. Task fails → UI resets → user must start over. All prior progress is discarded; repeated runs spam the LLM/API and local indexers. Actual behavior No health checks before heavy phases. No circuit breaker when IO/LLM is flaky. No checkpoint/journaling → on failure, full re-run from phase 0. Retries re-trigger the same expensive steps and API calls. Expected behavior Resilience: Pre-flight health check (IO + LLM availability) before plan generation. Circuit breaker: back off when ripgrep/SQLite/LLM are failing; show “degraded” mode instead of crashing. Progress preservation: Checkpointed phases: persist phase outputs (discovery results, partial indexes, agent reports). On retry, resume from last good checkpoint, not from scratch. Idempotent, bounded retries with exponential backoff and jitter. Impact User time lost; repeated cold-starts. Excess API spend from redundant LLM calls. Higher likelihood of DB corruption / flakiness due to hammering during degraded IO. Proposed changes 1) Health checks (pre-flight + periodic) IO check: small ripgrep probe with 2s timeout on repo root; if it times out, prompt to reduce scope or continue in degraded mode. LLM check: /models (or light inference) with 2s timeout; surface provider status before kicking off multi-phase flows. 2) Circuit breaker Trigger when any of: ≥3 ripgrep timeouts in 30s SQLITE_BUSY streak > N LLM 5xx/timeout > M in rolling window Behavior: Stop new LLM calls temporarily. Allow local phases to proceed (or pause with UI notice). Retry after exponential backoff (e.g., 5s, 15s, 45s). .... See attached text file for code snippets and futher information. Ran it though 5o just to make sure ti made sense https://cdn.discordapp.com/attachments/1404541239319330927/1404541239470194832/message.txt?ex=689e3376&is=689ce1f6&hm=e0ec22d0cebae8bdc839104ec68cb9877b4bf3608500cef111d44c0c6f430a3f&
f
Thanks for reporting. We can implement logical checkpoints for long-running queries after each response from the LLM. Currently, the checkpoint is only for the final response (fixed point). We are aware of this and have been discussing it internally. There is scope for adding a lot more resilience, and this helps the user as well as cuts costs at our end
f
Perfect, Thank you! Also, I suppose you're using your own LLM routing or a API service for redundancy... But had you considered letting users utilize their own, might allow for further offloading and relief on your end
f
We use several providers and models underneath based on the best one for each workflow and prompt. We have deliberately not exposed that to the user and opted to provide a curated, turn key experience instead
f
Hey, i just saw you responded to my Reddit comment. Way to be on top of your brand! lol, I have huge respect for that. Your insight about standardizing spec foundationally as a feature is on point - especially as the AI space keeps changing so rapidly. It seems like every week a whitepaper or publication goes out about agentic orchestration and pattern optimizations.