Skip to content

POC: the answer-again cap is the loop's again flag - #3825

Closed
cursor[bot] wants to merge 5 commits into
mainfrom
poc/shorter-answer-again
Closed

cursor[bot] wants to merge 5 commits into
mainfrom
poc/shorter-answer-again

Conversation

@cursor

@cursor cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Code Snob. This PR does not merge.

The answer-again loop on #3823 keeps a second request flag, answerRoundOpen, so a round past MAX_ANSWERS_AGAIN can start and then skip its sources. The loop already stops when again is false. That flag is the cap.

What this subtracts

answerRoundOpen, the roundOpen predicate, and answer-again-open-round. After the last counted answer, again is false, so no further source runs. A round clears the messages it consumed when it counts the answer, which is what stops the plan's message being asked again.

Fold 4b746f18c onto ba5415c6 (claude/project-thread-uzb61a). Do not reset onto this branch. Close this PR unmerged after #3823 lands.

What still passes

Same contract: the cap stays 3, the plan's answer still counts, both sources still join into one answer, and a source still does not run after the cap. No take, notice, or turn-gating change.

  • answer-again-finished-tasks 9 passed
  • worker-plans-its-steps 22 passed
  • eslint on plan.ts passed

Red: answered <= MAX_ANSWERS_AGAIN answered 4 times (expected 3).

Net −12 (plan.ts, +16/−28).

Open in Web View Automation 

… while it answered

- orchestration: takeOwedNotice takes an owed notice in the running
  request's name through onTaskSettled's take record (shared takeFor).
- workforce: takeFinishedTasks (person's turn only), handled by the same
  steps as the queued onTaskSettled (settleTakenNotice), and
  finishedTasksAnswerAgain, the pre-built source.
- planned's answer-once-more becomes one answer-again step with two
  sources (the plan, the flow's) under MAX_ANSWERS_AGAIN, on doWhile.
- defineAgentWorkerFlow({ answerAgain: true | block }).
- Goal: goals/hand-offs/result-reaches-the-running-turn.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9RvCHba2QKPohNxnZNzct
…ce (FIX-2159)

Workforce README: the answerAgain option, the finished-tasks source, its
limits and exports. Orchestration README: taking an owed notice in a
running request. Goal verdict log: PASS at af14e78b.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9RvCHba2QKPohNxnZNzct
…test (FIX-2159)

"user" for the signed-in user, and a test helper not named like the
retired ask mark, so the Process guards pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9RvCHba2QKPohNxnZNzct
…out takeNotice (FIX-2159)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9RvCHba2QKPohNxnZNzct
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 24, 2026 12:22am UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 24, 2026 12:22am UTC
flow-state-dev-ui Ignored Ignored Preview Oct 24, 2026 12:22am UTC

Request Review

The open-round flag only existed so a round past MAX_ANSWERS_AGAIN could start and skip its sources. The loop already stops when again is false, so that flag is the cap. This branch does not merge.

Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
@cursor
cursor Bot force-pushed the poc/shorter-answer-again branch from 4b746f1 to fdf7863 Compare October 24, 2026 00:22
jhoffner pushed a commit that referenced this pull request Oct 24, 2026
The round-open flag only let a round past MAX_ANSWERS_AGAIN start and
then skip its sources. The loop already stops when a round says not to
look again, so the last counted answer says so and no further source
runs. A round's consumed messages are cleared with the answer that used
them, and decidePlan clears them for a fresh turn.

Folds the subtraction proposed in #3825.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9RvCHba2QKPohNxnZNzct
@jhoffner jhoffner closed this Oct 24, 2026
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.

3 participants