Repository navigation
fix: spend a follow-up only when its prompt is submitted - #87
Merged
Merged
Conversation
An MCP follow-up reserved one of the automatic follow-ups before the task was created, so a send the browser refused before typing still used it up. Measured 2026-11-02 in the browser container: two follow-ups in one conversation refused as composer_not_ready were recorded as its follow-ups 3 and 4 of 5, with no prompt sent. The consult now checks the budget without spending it before any task or browser work, and reserves the follow-up from a new beforePromptSubmit step that the send runs once the prompt is typed and checked, right before Enter. A retry after browser recovery reserves once. If another follow-up used the last of the budget while this one waited for the browser, the send stops before submitting, the task is recorded as blocked with followup_approval_required and the caller gets awaiting_user. The ledger format is unchanged. Verified: new tests for the hook order (typed, no Enter yet), a refusing hook (no Enter), a pre-submit refusal that leaves the budget, and the race; tsc clean; full suite 1865 passed, 3 skipped. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
What this touches
7 file(s), 240 line(s) changed. Tests changed. This is an automated first pass, not a review. CI is the gate; a person decides. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
youdie006
added a commit
that referenced
this pull request
Nov 4, 2026
…ntainer image An MCP follow-up reserved one of the automatic follow-ups before the task was created, so a send the browser refused before typing still used it up. This container's ledger recorded two follow-ups refused as composer_not_ready on 2026-11-02 as follow-ups 3 and 4 of 5. Same change as main PR #87: the budget is checked without spending it before any task or browser work, and reserved from beforePromptSubmit, which the send runs right before Enter. Verified: tsc clean; full suite 2179 passed, 3 skipped; release:verify ok. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
youdie006
added a commit
that referenced
this pull request
Nov 4, 2026
0.40.50 (#84-#87) published and installed on WSL, M3 and the Mac mini; M4 was unreachable. Both browser containers now run c7c9f35. Includes the live check of #87 on the WSL container: a follow-up refused before submitting left the budget, and the ledger holds one reservation. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An MCP follow-up (
pro_consultwithcontinue_taskorcontinue_thread) reserved one of the automatic follow-ups (PRODEX_MAX_AUTO_FOLLOWUPS, default 5) before the consult task was created. A send the browser refused before anything was typed still used it up.Measured 2026-11-02 in the browser container's ledger: two follow-ups in one conversation, refused as
composer_not_ready, were recorded as its follow-ups 3 and 4 of 5, with no prompt sent.Change
assertFollowupAvailablechecks the budget under the same lock without writing anything. It still runs before any task is created or the browser is touched, so an exhausted budget returnsawaiting_userexactly as before.sendChatGptPrompttakesbeforePromptSubmit, run once the prompt is typed and checked, right before Enter. The MCP consult reserves the follow-up there. A retry after browser recovery reserves once.followup_approval_required, and the caller getsawaiting_user. The typed prompt stays in the composer until the next send clears it..bridgestill agree on the count.docs/clients.mdand CHANGELOG describe what counts.Verification
awaiting_userwith the task recorded as blocked.npx tsc --noEmitis clean.The container branch port follows separately.