Skip to content

Make budgeted GenPlan CLI runs reliable - #177

Open
joshnroy wants to merge 1 commit into
codex/genplan-source-accessfrom
codex/claude-cli-resume
Open

Make budgeted GenPlan CLI runs reliable#177
joshnroy wants to merge 1 commit into
codex/genplan-source-accessfrom
codex/claude-cli-resume

Conversation

@joshnroy

@joshnroy joshnroy commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resume exact Claude CLI conversation continuations by session ID and send only the new user turn
  • retain the plain-LLM isolation flags while resuming
  • use one shared ten-hour GenPlan container limit for Docker and Apptainer
  • remove named Docker containers when host launch times out or is interrupted
  • retry explicitly uncharged Claude HTTP 5xx failures with bounded exponential backoff and jitter
  • wait until the reported reset after explicitly uncharged session-limit 429 responses, then retry
  • preserve immediate failure for ambiguous-cost responses and non-retryable errors

Why

These behaviors all belong to one runtime reliability boundary: a budgeted GenPlan conversation should survive transient service failures and subscription reset windows without duplicating potentially charged calls, losing conversation context, or outliving its host process.

The former one-hour Docker timeout could abandon a $20 run before held-out evaluation. The former completion path also surfaced transient 5xx and session-limit 429 responses as fatal errors even though the agentic path already knew how to wait for reset.

Verification

  • 121 focused tests passed (2 paid integration tests deselected)
  • changed-file mypy passed
  • Black, isort, pylint, and diff checks passed
  • added regression coverage for session continuation, isolation flags, timeout cleanup, uncharged 5xx retries, session-limit waits, and ambiguous-cost failures

Stack

Stacked on #172. This PR now includes the former #179 and #181.

@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from a73bf81 to fa4d524 Compare September 2, 2026 14:12
@joshnroy
joshnroy changed the base branch from codex/genplan-allow-search to codex/genplan-source-access September 2, 2026 14:12
@joshnroy joshnroy changed the title Resume Claude CLI conversations for GenPlan cache reuse Make budgeted GenPlan CLI runs reliable Sep 2, 2026
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from fa4d524 to 2ea0b9e Compare September 2, 2026 14:20
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from 2ea0b9e to 90b0206 Compare September 2, 2026 14:23
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from 90b0206 to d61bea4 Compare September 3, 2026 00:57
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from d61bea4 to ff0e5a4 Compare September 3, 2026 01:16
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from ff0e5a4 to 1e31015 Compare September 3, 2026 01:29
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from 1e31015 to 01a205d Compare September 3, 2026 01:31
@joshnroy
joshnroy marked this pull request as ready for review September 3, 2026 01:43
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from 01a205d to 35ea695 Compare September 4, 2026 14:31
@joshnroy joshnroy self-assigned this Sep 4, 2026
@joshnroy
joshnroy requested a review from merlerm September 4, 2026 22:02
@joshnroy
joshnroy force-pushed the codex/claude-cli-resume branch from 35ea695 to cf91793 Compare September 4, 2026 22:03

@merlerm merlerm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do you think some of these changes would also be good to include in our agentic backend? Also one thing to be careful of is to check if when there are two parallel runs going, each resumes to its own correct history instead of a different one. I had some issues with this at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants