Repository navigation
fix(flow): keep the unusual-activity hold across restarts, bound hijack retries - #75
Merged
Merged
Conversation
…ck retries Issue #67 reports accounts whose manual Flow UI generation was blocked after FlowKit testing; retrying into the block is a suspected cause. - The generation hold after PUBLIC_ERROR_UNUSUAL_ACTIVITY is written to flow_generation_hold.json and restored on start, so a restart no longer lifts it. FLOW_UNUSUAL_ACTIVITY_COOLDOWN_S defaults to 3600 (was 120). A shorter hold never replaces a longer one or its reason. - [HIJACK] extension_hijack_detected was requeued forever without counting; it now fails once retry_count reaches 3. - Any "unusual_activity" spelling is terminal; a bare code no longer falls into the 10x reCAPTCHA retry loop. - POST /api/flow/clear-hijack clears the file too; /api/flow/status reports the hold's reason. Takes the persistent-hold and bounded-retry ideas of #68 onto the current batch transport. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 25, 2026
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.
Account-safety follow-up to #67 / #74, on the current batch transport.
PUBLIC_ERROR_UNUSUAL_ACTIVITYno generation is submitted forFLOW_UNUSUAL_ACTIVITY_COOLDOWN_S, now 3600s by default (was 120s). The hold is written toflow_generation_hold.jsonand restored on start, so restarting the agent no longer lifts it. A shorter hold never replaces a longer one or its reason.GET /api/flow/status→generation_throttle.cooldown_reasonshows it.[HIJACK] extension_hijack_detectedused to be requeued forever without counting. It now fails once the request'sretry_countreaches 3 (the count is shared with other retries, so it can only stop sooner).unusual_activityspelling is terminal. A bare code no longer falls into the 10× reCAPTCHA retry loop.POST /api/flow/clear-hijacklifts the hold including the file./fk-doctordocuments both errors and says to lift the hold only once manual generation in the Flow UI works.This takes the persistent-hold and bounded-retry ideas from #68 (thanks @raducupreda-art). #68 itself conflicts with
mainafter the Flow move and makes generation opt-in; that broader gating is left for separate discussion.Test plan:
pytest -q tests: 480 passed, 2 skipped (8 new tests: hold survives a restart, expired/corrupt file ignored, clear removes the file, hijack sets a short hold, shorter hold keeps the longer one's reason, hijack retries counted then FAILED, bareUNUSUAL_ACTIVITYterminal)FlowClientreturns 429 with no submit →clear-hijackremoves the file🤖 Generated with Claude Code