Skip to content

fix(composer): retry follow-up continue during teardown - #991

Open
matgren wants to merge 1 commit into
mainfrom
cez/8081d24d
Open

matgren wants to merge 1 commit into
mainfrom
cez/8081d24d

Conversation

@matgren

@matgren matgren commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🎯 What changes

When an agent session has just ended, the transcript can already show Session closed while the RunManager is still finishing teardown and still rejects POST /continue with 409 run is still active. Ask answers already handle that narrow transition with a bounded retry, but the main follow-up composer did not, so a user could type into a closed-but-resumable run and get stuck on that transient server response.

This change routes the follow-up composer's Continue action through the same retry helper. The retry only applies to the exact teardown refusal, and it reuses the same prompt, pasted images, runner, model, and account options so the user's draft is not dropped.

📋 Scope

The change is limited to the web task-thread follow-up path in follow-up-engine.tsx plus a regression test in follow-up-engine.test.tsx. It does not relax the backend active-run guard, change live-message delivery, or alter the ask-card behavior that already used this policy.

🧪 Validation

  • npm run typecheck
  • TMPDIR=/tmp TMP=/tmp npm test — 327 files, 6197 tests passed. The first run without overriding TMPDIR failed because this Cezar task sets temp dirs inside the repository, making "outside a git repository" tests discover the parent checkout.
  • TMPDIR=/tmp TMP=/tmp npm run test:unit
  • TMPDIR=/tmp TMP=/tmp npm run build
  • TMPDIR=/tmp TMP=/tmp npm run test:package
  • Focused checks: follow-up-engine.test.tsx, ask-answer.test.ts, typecheck:web, build:web.

Manual QA is still useful because this is a user-facing cockpit recovery path: reproduce by sending a follow-up immediately after a session closes and confirming Continue retries into a reopened session.

@matgren matgren added review Ready for code review bug Something isn't working needs-qa Requires manual QA before merge priority-medium Ordinary bug or feature risk-medium Ordinary change with tests labels Sep 15, 2026
@matgren

matgren commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 om-open-pr — 🏷️ label rationale

  • 🔍 review — ready for code review after the configured validation gate passed.
  • 🐛 bug — fixes a cockpit follow-up composer regression where a closed-but-resumable session could reject Continue during teardown.
  • 🧪 needs-qa — the recovery path is user-facing and should be exercised manually around the session-close timing window.
  • 🔹 priority-medium — this can block affected users from continuing a task, but it is not an outage, data loss, or security incident.
  • 🟡 risk-medium — the change touches a session-resume path, but it reuses the existing bounded retry helper and has focused regression coverage.

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

Labels

bug Something isn't working needs-qa Requires manual QA before merge priority-medium Ordinary bug or feature review Ready for code review risk-medium Ordinary change with tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant