Skip to content

[3435 by Claude Opus 5.5] Give Claude goal runs an ask_operator tool backed by goal blockers - #3452

Merged
integry merged 6 commits into
3435-epic-let-claude-r1kfrom
3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6
Nov 12, 2026
Merged

integry merged 6 commits into
3435-epic-let-claude-r1kfrom
3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3435

Branch: 3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6
Commits: ✅ Changes committed (3c880d6)


AI Processing Completed

Execution Details:

Summary:
Claude goal runs now have an ask_operator tool. Claude calls it with a question, the question shows under "Needs you" as a goal blocker, and the operator's next goal input comes back to Claude as the tool's answer. Typecheck passes for shared, core, api, cli and root. The changed and new tests pass, and eslint --max-warnings 0 is clean for the touched files.

How it works

  • The tool (operatorQuestionMcpServer.ts): a small inline stdio MCP server like the repository scout. It takes one question (up to 1000 characters) with optional 2–10 options of up to 200 characters, the same limits as goalBlockers.ts. The description tells Claude to ask only about decisions it can't settle from the goal, the repository or a sensible default, and never to ask for credentials. The same guidance goes into the context turn of a fresh session.
  • Transport: each attempt gets its own exchange directory under /tmp/claude-logs/propr-operator/<uuid>/, which the container already mounts. The server writes a request file and waits for a response file. Nothing needs the ProPR API or network access, so it works in restricted network mode, and no credentials are added. Claude runs as node inside the container, so the request directory is writable by others but can't be listed, and the directory names are random.
  • Wait limit: I checked the installed Claude CLI binary for how MCP tool calls time out. MCP_TIMEOUT only covers startup. Tool calls have a per-server timeout that is a hard limit (progress notifications don't extend it), plus a 30-minute idle limit for stdio servers that rises to match it. The config therefore sets that timeout above the maximum wait.
  • Worker side (claudeOperatorQuestions.ts): this follows the Codex behaviour.
    • Each question is recorded as a question blocker with send_input among its actions, fenced to the run generation, claim and session.
    • The first input after the question appeared becomes the tool result. It is marked delivered and the blocker is resolved.
    • Input that was already queued, or input sent while several questions wait, is delivered as an ordinary correction, as today.
  • Lifecycle:
    • The goal keeps heartbeating while Claude waits. The turn never ends, so the continue nudge never fires.
    • Pause or cancel closes the question first and then interrupts.
    • When a turn or attempt ends, open questions are closed (turn_ended / attempt_ended) and the tool call fails cleanly. A replaced attempt is closed by the existing superseded_by_attempt path.
    • The exchange directory is removed when the attempt finishes.
  • Timeout: a new instance setting, goal_question_max_wait_ms, defaults to 24 hours, has a 60-second minimum, and is capped by the agent timeout. When it runs out, Claude gets a clear "no answer" message. The server has its own deadline in case the worker is gone. The setting can be changed through the REST API, update_execution_settings and propr setting update, and is listed in the settings catalog.
  • Goal mode only: buildDockerArgs adds the tool only when executionMode === 'goal'. A test checks that task-mode arguments are identical with or without the option.
  • Capabilities and docs:
    • GOAL_BLOCKER_PROVIDER_SUPPORT now lists Claude questions as supported; approvals stay unavailable.
    • get_goal_capabilities has a new controls.operatorQuestions field, true for Codex and Claude.
    • I updated goals.md (new "Claude questions" section and the provider table), mcp.md, propr-cli.md and the CHANGELOG, and regenerated settings-locations.md.

Things to know

  • Two new blocker resolution values, answered and question_timed_out, are stored for audit.
  • Every agent container mounts /tmp/claude-logs read-write. Another container could therefore, in principle, write into a goal's exchange directory if it knew the random name.
  • Nothing has been run against a live Claude container. The tests run the real inline server as a process, and the goal protocol is tested with a scripted session.
  • No visual preview: the UI didn't change.

Tests

  • New test/claudeOperatorQuestions.test.ts covers: the round trip through the real server, fencing, input boundaries, several waiting questions, input checks, declining questions during the context turn, timeouts on both sides, attempt end, directory permissions, launch arguments and the capability projection.
  • test/claudeNativeGoal.test.ts gains protocol tests: the answer arrives as the tool result and not as a message, earlier input stays a correction, pause and cancel while waiting, and the context-turn guidance.
  • I updated the existing assertions in goalBlockers, goalExecutionMode and configRoutes.followup, and added a validation test for the setting in the CLI.

Detailed Logs:

  • Conversation: 243 messages
  • Session: 7b49d336-7464-4040-9b29-4292ab8ec6be

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3435-2026-11-11T22-28-39-346Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3435-2026-11-11T22-28-39-346Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Claude goal runs now have an `ask_operator` tool. Claude calls it with a question, the question shows under "Needs you" as a goal blocker, and the operator's next goal input comes back to Claude as th...


This PR was created automatically by ProPR after processing issue #3435.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…h a question, the question shows under "Needs you" as a goal blocker, and the operator's next goal input comes back to Claude as the tool's answer. Typecheck passes for shared, core, api, cli and root. The changed and new tests pass, and eslint `--max-warnings 0` is clean for the touched files.

How it works
- The tool (`operatorQuestionMcpServer.ts`): a small inline stdio MCP server like the repository scout. It takes one question (up to 1000 characters) with optional 2–10 options of up to 200 characters, the same limits as `goalBlockers.ts`. The description tells Claude to ask only about decisions it can't settle from the goal, the repository or a sensible default, and never to ask for credentials. The same guidance goes into the context turn of a fresh session.
- Transport: each attempt gets its own exchange directory under `/tmp/claude-logs/propr-operator/<uuid>/`, which the container already mounts. The server writes a request file and waits for a response file. Nothing needs the ProPR API or network access, so it works in restricted network mode, and no credentials are added. Claude runs as `node` inside the container, so the request directory is writable by others but can't be listed, and the directory names are random.
- Wait limit: I checked the installed Claude CLI binary for how MCP tool calls time out. `MCP_TIMEOUT` only covers startup. Tool calls have a per-server `timeout` that is a hard limit (progress notifications don't extend it), plus a 30-minute idle limit for stdio servers that rises to match it. The config therefore sets that `timeout` above the maximum wait.
- Worker side (`claudeOperatorQuestions.ts`): this follows the Codex behaviour.
  - Each question is recorded as a `question` blocker with `send_input` among its actions, fenced to the run generation, claim and session.
  - The first input after the question appeared becomes the tool result. It is marked delivered and the blocker is resolved.
  - Input that was already queued, or input sent while several questions wait, is delivered as an ordinary correction, as today.
- Lifecycle:
  - The goal keeps heartbeating while Claude waits. The turn never ends, so the continue nudge never fires.
  - Pause or cancel closes the question first and then interrupts.
  - When a turn or attempt ends, open questions are closed (`turn_ended` / `attempt_ended`) and the tool call fails cleanly. A replaced attempt is closed by the existing `superseded_by_attempt` path.
  - The exchange directory is removed when the attempt finishes.
- Timeout: a new instance setting, `goal_question_max_wait_ms`, defaults to 24 hours, has a 60-second minimum, and is capped by the agent timeout. When it runs out, Claude gets a clear "no answer" message. The server has its own deadline in case the worker is gone. The setting can be changed through the REST API, `update_execution_settings` and `propr setting update`, and is listed in the settings catalog.
- Goal mode only: `buildDockerArgs` adds the tool only when `executionMode === 'goal'`. A test checks that task-mode arguments are identical with or without the option.
- Capabilities and docs:
  - `GOAL_BLOCKER_PROVIDER_SUPPORT` now lists Claude questions as `supported`; approvals stay unavailable.
  - `get_goal_capabilities` has a new `controls.operatorQuestions` field, true for Codex and Claude.
  - I updated `goals.md` (new "Claude questions" section and the provider table), `mcp.md`, `propr-cli.md` and the CHANGELOG, and regenerated `settings-locations.md`.

Things to know
- Two new blocker resolution values, `answered` and `question_timed_out`, are stored for audit.
- Every agent container mounts `/tmp/claude-logs` read-write. Another container could therefore, in principle, write into a goal's exchange directory if it knew the random name.
- Nothing has been run against a live Claude container. The tests run the real inline server as a process, and the goal protocol is tested with a scripted session.
- No visual preview: the UI didn't change.

Tests
- New `test/claudeOperatorQuestions.test.ts` covers: the round trip through the real server, fencing, input boundaries, several waiting questions, input checks, declining questions during the context turn, timeouts on both sides, attempt end, directory permissions, launch arguments and the capability projection.
- `test/claudeNativeGoal.test.ts` gains protocol tests: the answer arrives as the tool result and not as a message, earlier input stays a correction, pause and cancel while waiting, and the context-turn guidance.
- I updated the existing assertions in `goalBlockers`, `goalExecutionMode` and `configRoutes.followup`, and added a validation test for the setting in the CLI.
@propr-dev

propr-dev Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 11, 2026
@propr-dev

propr-dev Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 2/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 2/4
  • Result: failure
  • Commit: 3c880d6cc777 (3c880d6cc77786f078655d1ded4c2337066183eb)
  • Details: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:36402
Process completed with exit code 1.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 760eb63

Summary of Changes

I fixed the Shard 2/4 failure. The failing test was packages/api/test/mcpObservableSurface.test.ts.

Cause: that test checks every snake_case name in docs/mcp.md. Each one must be either a ProPR MCP tool an admin can see, or a word on the test's list of non-tool names. This PR's doc changes added two names that are neither:

  • ask_operator: the tool injected into Claude goal sessions, not a ProPR MCP tool.
  • goal_question_max_wait_ms: the new instance setting.

Fix: I added both names to the non-tool list in the test, with a comment saying what they are. The docs themselves are unchanged.

Checks:

  • The failing test passes locally (it failed twice first, once for each name).
  • ESLint with --max-warnings 0 is clean for the file.
  • 20 related suites pass, covering the docs, settings catalog, OpenAPI coverage, Claude agent launch and goal tests.

Shards 1, 3 and 4 of that CI run were cancelled when shard 2 failed, so they never finished. The 20 related suites pass, but the rest of what those shards cover hasn't been run on this commit. That happens on the next CI run.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 5m 34s
  • Tokens: 734,568 (730,842 in / 3,726 out)
  • Cost: $0.44

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6808837238✓

…es/api/test/mcpObservableSurface.test.ts`.

I fixed the Shard 2/4 failure. The failing test was `packages/api/test/mcpObservableSurface.test.ts`.

**Cause:** that test checks every snake_case name in `docs/mcp.md`. Each one must be either a ProPR MCP tool an admin can see, or a word on the test's list of non-tool names. This PR's doc changes added two names that are neither:
- `ask_operator`: the tool injected into Claude goal sessions, not a ProPR MCP tool.
- `goal_question_max_wait_ms`: the new instance setting.

**Fix:** I added both names to the non-tool list in the test, with a comment saying what they are. The docs themselves are unchanged.

**Checks:**
- The failing test passes locally (it failed twice first, once for each name).
- ESLint with `--max-warnings 0` is clean for the file.
- 20 related suites pass, covering the docs, settings catalog, OpenAPI coverage, Claude agent launch and goal tests.

Shards 1, 3 and 4 of that CI run were cancelled when shard 2 failed, so they never finished. The 20 related suites pass, but the rest of what those shards cover hasn't been run on this commit. That happens on the next CI run.

PR: #3452
Comment by: @propr-dev[bot] (ID: 6808837238)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Claude operator questions through a file-backed MCP server, integrates them with goal blockers, and exposes the setting across API, MCP, CLI, and documentation. It needs a localized timeout correction before merge.

✅ Input ordering — Persisted input boundaries distinguish earlier corrections from answers submitted after a question appears.

✅ Task isolation — Tool injection is explicitly restricted to goal mode, with tests comparing task launch arguments.

✅ Lifecycle coverage — Tests cover answers, pause/cancel, context-turn refusal, and question cleanup.

The supplied checks show 34 passed, none failed, and one pending. This review uses static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Question timeout can outlive the attempt

  • Required behavior: An unanswered question must return the documented no-answer result so Claude can continue or stop deliberately; bounding its wait must account for the attempt’s actual remaining lifetime.

  • Evidence: packages/core/src/agents/impl/ClaudeAgent.ts:prepareOperatorQuestions, packages/core/src/agents/impl/claudeOperatorQuestions.ts:sync, and packages/core/src/agents/impl/claudeNativeGoal.ts:executeClaudeNativeGoal.

    1. Configure an agent timeout of one hour and leave the question setting at its default 24 hours.
    2. prepareOperatorQuestions bounds the question duration to one hour. executeClaudeNativeGoal separately starts the one-hour timer that kills the child.
    3. Claude asks a question ten minutes into the attempt. sync records openedAt then, so the worker will return no_answer seventy minutes after attempt startup.
    4. At sixty minutes, the attempt timer kills the child, ten minutes before the question timeout. Claude never receives the promised no-answer result or gets an opportunity to proceed.

    The server fallback cannot prevent this: it waits the same question duration plus another 30 seconds. Heartbeats preserve worker liveness but do not extend the explicit child-kill timer. Existing tests check duration clamping and question expiration independently, without advancing the attempt clock before opening a question.

    static trace: The launch uses the total agent duration, while question expiration starts at question registration and process termination starts at attempt launch. This also affects shorter settings when a question is asked sufficiently late.

  • Minimum fix: Pass the absolute attempt deadline into the question channel and expire questions before that deadline, leaving time to deliver and process the result. Decline a new question when insufficient attempt time remains. Add a regression covering a question opened partway through an attempt.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise the actual Claude runtime

The standalone server and scripted protocol tests provide useful coverage, but do not exercise Claude loading the injected configuration or honoring its server timeout. A disposable container smoke test covering discovery, answering, and interruption would strengthen integration confidence. This is optional validation, not evidence of another defect.

S2: 🟢 Verify cancellation propagation

The inline server handles notifications/cancelled by stopping its local wait, but leaves the request file and provides no cancellation signal to the worker. Check whether the supported Claude runtime can cancel an individual call while keeping its turn active; if so, propagate cancellation to prevent a stale blocker from consuming later input. That runtime behavior is not established by the supplied context, so this remains a follow-up rather than a verified blocker.

Score

The implementation has substantial focused coverage and consistent configuration wiring, but unanswered questions can terminate with the attempt instead of returning their documented result. The remaining check is pending, not failed.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 1s
  • Tokens: 77,328 (76,033 in / 1,295 out)
  • Cost: $0.69

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 621da5e

Addressed 1 AI review comment (IDs: 6809511297)

Addressed finding F1

Summary of Changes

I fixed F1. A Claude question now stops waiting before the attempt's own timeout, so Claude always gets the no-answer result while it can still act on it. Before, a question asked partway through an attempt could still be waiting when the attempt was killed.

What changed

  • One shared close time. Before building the container, executeClaudeNativeGoal works out when the attempt started plus the agent timeout, minus a reserve of 5 minutes (or a tenth of the timeout, if that is shorter). Questions close at that time. The kill timer starts slightly later, so this close time is always before the kill. The new boundOperatorQuestionLaunch helper in operatorQuestionMcpServer.ts computes it, and buildDockerArgs now receives this bounded launch from the attempt.
  • Worker side (claudeOperatorQuestions.ts).
    • Each question's expiry is now the earlier of "opened + maximum wait" and the attempt's close time.
    • When the close time is what ends the wait, Claude gets "No answer from the operator before this goal attempt runs out of time…", and the blocker is still resolved as question_timed_out.
    • With less than 60 seconds left before the close time, a new question gets the no-answer result immediately and no blocker is shown under "Needs you".
  • Server side (the fallback if the worker is gone). The close time is passed in as PROPR_OPERATOR_CLOSE_AT. The server checks it before writing a request, so it turns down a late question by itself. It also never waits past the close time plus its 30-second grace. It now passes on the worker's no-answer message instead of always printing its own.
  • Tool description. The "at most …" wait it gives Claude is capped by the time left in the attempt at launch, so it is accurate.
  • Docs. I updated the "No answer" bullet in docs/docs/features/goals.md and the CHANGELOG entry.

New tests in test/claudeOperatorQuestions.test.ts:

  • The scenario from the finding: a one-hour attempt with the default 24-hour setting. A question opened at minute 10 is still waiting just before minute 55 and gets the no-answer result at minute 55, before the kill at minute 60.
  • A question asked with under a minute left gets the immediate result and no blocker.
  • The server alone turns down a question when its close time is near, without writing a request file.
  • The bounded launch values, including the tenth-of-timeout reserve for short timeouts, reach the server's environment.

Verification:

  • claudeOperatorQuestions passes 21 of 21. claudeNativeGoal passes, and so does nativeGoalLaunchBoundary, which needs --experimental-test-module-mocks on this container's Node 22.
  • tsc passes for packages/core and the root project.
  • eslint with --max-warnings 0 is clean on the four changed core source files. The test file is outside the root eslint config, as it was before.
  • Nothing has been run against a live Claude container.

The UI didn't change, so there is no visual preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 55s
  • Tokens: 1,533,628 (1,517,259 in / 16,369 out)
  • Cost: $0.97

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…attempt's own timeout, so Claude always gets the no-answer result while it can still act on it. Before, a question asked partway through an attempt could still be waiting when the attempt was killed.

I fixed F1. A Claude question now stops waiting before the attempt's own timeout, so Claude always gets the no-answer result while it can still act on it. Before, a question asked partway through an attempt could still be waiting when the attempt was killed.

**What changed**
- **One shared close time.** Before building the container, `executeClaudeNativeGoal` works out when the attempt started plus the agent timeout, minus a reserve of 5 minutes (or a tenth of the timeout, if that is shorter). Questions close at that time. The kill timer starts slightly later, so this close time is always before the kill. The new `boundOperatorQuestionLaunch` helper in `operatorQuestionMcpServer.ts` computes it, and `buildDockerArgs` now receives this bounded launch from the attempt.
- **Worker side (`claudeOperatorQuestions.ts`).**
  - Each question's expiry is now the earlier of "opened + maximum wait" and the attempt's close time.
  - When the close time is what ends the wait, Claude gets "No answer from the operator before this goal attempt runs out of time…", and the blocker is still resolved as `question_timed_out`.
  - With less than 60 seconds left before the close time, a new question gets the no-answer result immediately and no blocker is shown under "Needs you".
- **Server side (the fallback if the worker is gone).** The close time is passed in as `PROPR_OPERATOR_CLOSE_AT`. The server checks it before writing a request, so it turns down a late question by itself. It also never waits past the close time plus its 30-second grace. It now passes on the worker's no-answer message instead of always printing its own.
- **Tool description.** The "at most …" wait it gives Claude is capped by the time left in the attempt at launch, so it is accurate.
- **Docs.** I updated the "No answer" bullet in `docs/docs/features/goals.md` and the CHANGELOG entry.

**New tests** in `test/claudeOperatorQuestions.test.ts`:
- The scenario from the finding: a one-hour attempt with the default 24-hour setting. A question opened at minute 10 is still waiting just before minute 55 and gets the no-answer result at minute 55, before the kill at minute 60.
- A question asked with under a minute left gets the immediate result and no blocker.
- The server alone turns down a question when its close time is near, without writing a request file.
- The bounded launch values, including the tenth-of-timeout reserve for short timeouts, reach the server's environment.

**Verification:**
- `claudeOperatorQuestions` passes 21 of 21. `claudeNativeGoal` passes, and so does `nativeGoalLaunchBoundary`, which needs `--experimental-test-module-mocks` on this container's Node 22.
- `tsc` passes for `packages/core` and the root project.
- eslint with `--max-warnings 0` is clean on the four changed core source files. The test file is outside the root eslint config, as it was before.
- Nothing has been run against a live Claude container.

The UI didn't change, so there is no visual preview.

PR: #3452
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds a well-contained question transport, durable blocker reporting, and settings across API, MCP, and CLI. It needs a localized lifecycle correction before merge: cancelling an MCP question does not withdraw the worker’s pending question.

✅ Goal-only injection — Docker argument construction explicitly excludes the tool from task mode, with regression coverage.

✅ Input ordering — Persisted input boundaries prevent previously queued corrections from answering a newly opened question.

✅ Bounded waiting — Worker deadlines, server fallback deadlines, and an attempt reserve prevent indefinite waits.

The supplied checks report 34 passed, none failed, and one pending. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Cancelled questions still consume operator input

  • Required behavior: An operator input must only be marked delivered as an answer when its question still has a waiting tool call. Cancelled questions must stop appearing as answerable blockers.

  • Evidence: packages/core/src/agents/impl/utils/operatorQuestionMcpServer.ts, notifications/cancelled handler and ask; packages/core/src/agents/impl/claudeOperatorQuestions.ts, sync and answer.

    1. An ask_operator call writes its request, and the worker reports it as an open blocker.
    2. The MCP client sends the explicitly supported notifications/cancelled notification for that request while the goal turn remains active. The handler sets wait.cancelled; ask returns “The question was cancelled” and removes the entry from waits.
    3. Neither path removes or marks the exchange request as cancelled, or otherwise informs the worker. The worker therefore retains its OpenQuestion.
    4. The operator sends goal input after seeing the still-open blocker. answer writes a response that no tool call is reading, marks the input delivered, resolves the blocker as answered, and returns true. Consequently, deliverInputs skips ordinary message delivery.

    The operator’s input is durably acknowledged but never reaches Claude. The interruption point is the server’s polling wait; cancellation is processed independently by its asynchronous line handler. Worker heartbeats and input-boundary checks do not communicate cancellation. Turn-end cleanup only helps when the entire turn ends, whereas the cancellation handler supports cancelling an individual request.

    static trace: Both sides of this sequence follow the supplied implementation. The tests cover goal pause/cancel, which proactively close worker questions, but do not cover the server’s request-cancellation notification.

  • Minimum fix: Publish cancellation through the exchange and reconcile it before routing answers, closing the corresponding blocker and preserving subsequent input for ordinary delivery. Also handle cancellation before the worker first discovers the request. Add a regression covering cancellation with the goal turn still active.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Exercise the deployed Claude runtime

A disposable container smoke test would complement the process-level server tests by checking actual MCP configuration loading, tool availability, and timeout behavior in the pinned Claude CLI. This is optional integration confidence work; the absence of that test alone does not demonstrate a defect.

S4: 🟢 Align setting validation limits

The MCP setting schema caps the wait at 30 days, while CLI and REST validation permit larger values. Sharing the accepted range would make these configuration surfaces more predictable. Because execution independently bounds the wait by the attempt deadline, this is a consistency improvement rather than a merge blocker.

Score

The implementation has substantial focused coverage and passing checks, but the cancellation path can silently lose operator input. The correction appears localized.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 18s
  • Tokens: 78,280 (76,708 in / 1,572 out)
  • Cost: $0.74

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F2 S3 S4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ea44cfa

Addressed 1 AI review comment (IDs: 6810220649)

Addressed finding F2

Summary of Changes

F2 is fixed. When Claude's MCP client cancels an ask_operator call while the goal turn is still running, the "Needs you" blocker now closes. The operator's next input is then delivered to Claude as an ordinary message, instead of being marked delivered as an answer nobody reads.

How it works

  • Shared claim file: each question now has a <request id>.claim file in the exchange's requests/ directory. It can only be created once (exclusive create). Whichever side creates it first, the worker delivering an answer or the server handling a cancellation, decides what happens to the input.
  • Server (operatorQuestionMcpServer.ts):
    • When notifications/cancelled arrives, the line handler writes the claim as cancelled right away, without waiting for the poll loop.
    • The wait is now registered before the request file is written. A cancellation that arrives during that write is no longer lost, and the claim exists before the worker ever sees the request.
  • Worker (claudeOperatorQuestions.ts):
    • sync skips a new request that is already cancelled, so it never becomes a blocker. It also closes any open question whose claim exists, with resolution provider_resolved (the value Codex uses when the provider withdraws a request).
    • answer does the same cleanup before choosing a question, so one cancelled question no longer blocks the answer to the one still waiting. It then has to win the claim before it writes the response or marks the input delivered. If the server won, the blocker closes and answer returns false, so deliverInputs sends the input as ordinary goal input.

Race that remains: if the worker claims the question just before the client's cancellation reaches the server, the input counts as an answer to a call the client has already given up on. Nothing in ProPR can prevent this, because the client cancels on its own and doesn't wait for the server. Every other stale window now ends at the claim check.

Tests: five new tests in test/claudeOperatorQuestions.test.ts drive the real inline server:

  • the question is cancelled while the turn is active, the blocker closes on sync, and the next input is not used as an answer.
  • the cancellation arrives with no sync before the input is sent.
  • one of two waiting questions is cancelled, and the input still answers the other.
  • the question is cancelled before the worker first sees it, so no blocker is created.
  • a late cancellation doesn't overwrite an answer that was already claimed.

All five fail against the previous code. With the fix, the file passes 26/26, test/claudeNativeGoal.test.ts passes 27/27, the packages/core typecheck passes, and eslint --max-warnings 0 is clean for the two changed source files.

Separate discovery, not changed: the timeout and closeOpen paths don't check the claim. If the client cancels just as a question times out, the blocker is recorded as question_timed_out instead of provider_resolved. That only affects the audit label; no input is lost.

There's no visual preview because the UI didn't change.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 8m 51s
  • Tokens: 1,187,026 (1,174,133 in / 12,893 out)
  • Cost: $0.80

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…tor` call while the goal turn is still running, the "Needs you" blocker now closes. The operator's next input is then delivered to Claude as an ordinary message, instead of being marked delivered as an answer nobody reads.

F2 is fixed. When Claude's MCP client cancels an `ask_operator` call while the goal turn is still running, the "Needs you" blocker now closes. The operator's next input is then delivered to Claude as an ordinary message, instead of being marked delivered as an answer nobody reads.

**How it works**
- **Shared claim file:** each question now has a `<request id>.claim` file in the exchange's `requests/` directory. It can only be created once (exclusive create). Whichever side creates it first, the worker delivering an answer or the server handling a cancellation, decides what happens to the input.
- **Server** (`operatorQuestionMcpServer.ts`):
  - When `notifications/cancelled` arrives, the line handler writes the claim as `cancelled` right away, without waiting for the poll loop.
  - The wait is now registered before the request file is written. A cancellation that arrives during that write is no longer lost, and the claim exists before the worker ever sees the request.
- **Worker** (`claudeOperatorQuestions.ts`):
  - `sync` skips a new request that is already cancelled, so it never becomes a blocker. It also closes any open question whose claim exists, with resolution `provider_resolved` (the value Codex uses when the provider withdraws a request).
  - `answer` does the same cleanup before choosing a question, so one cancelled question no longer blocks the answer to the one still waiting. It then has to win the claim before it writes the response or marks the input delivered. If the server won, the blocker closes and `answer` returns `false`, so `deliverInputs` sends the input as ordinary goal input.

**Race that remains:** if the worker claims the question just before the client's cancellation reaches the server, the input counts as an answer to a call the client has already given up on. Nothing in ProPR can prevent this, because the client cancels on its own and doesn't wait for the server. Every other stale window now ends at the claim check.

**Tests:** five new tests in `test/claudeOperatorQuestions.test.ts` drive the real inline server:
- the question is cancelled while the turn is active, the blocker closes on `sync`, and the next input is not used as an answer.
- the cancellation arrives with no `sync` before the input is sent.
- one of two waiting questions is cancelled, and the input still answers the other.
- the question is cancelled before the worker first sees it, so no blocker is created.
- a late cancellation doesn't overwrite an answer that was already claimed.

All five fail against the previous code. With the fix, the file passes 26/26, `test/claudeNativeGoal.test.ts` passes 27/27, the `packages/core` typecheck passes, and eslint `--max-warnings 0` is clean for the two changed source files.

**Separate discovery, not changed:** the timeout and `closeOpen` paths don't check the claim. If the client cancels just as a question times out, the blocker is recorded as `question_timed_out` instead of `provider_resolved`. That only affects the audit label; no input is lost.

There's no visual preview because the UI didn't change.

PR: #3452
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds a well-scoped operator-question channel for Claude goals, with durable blockers, configurable deadlines, and documentation. It needs a localized cancellation fix before merge.

✅ Goal-only injection — Docker argument construction explicitly excludes the tool from task execution, with regression coverage.

✅ Input ordering — Answers must follow the blocker’s persisted input boundary; earlier inputs remain ordinary corrections.

✅ Bounded waiting — Worker and server deadlines reserve time before attempt termination, and pause/cancel paths close waiting questions.

This review used static analysis of the supplied code only. No commands were run. No current-head check runs were reported.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Cancellation ignores an answered claim

  • Required behavior: The exclusive claim must consistently decide whether cancellation wins or an operator input is consumed as the tool answer.

  • Evidence: packages/core/src/agents/impl/utils/operatorQuestionMcpServer.ts, claimCancelled, ask, and the notifications/cancelled handler; packages/core/src/agents/impl/claudeOperatorQuestions.ts, answer.

    1. An open tool call is sleeping in ask’s polling timer while an operator submits an answer.
    2. The worker successfully creates the exclusive answered claim, publishes the answer file, marks the input delivered, and resolves the blocker as answered.
    3. Before the server’s next poll reads that response, a cancellation notification arrives. The handler immediately sets wait.cancelled = true.
    4. claimCancelled encounters EEXIST because the worker already won, but suppresses that result without undoing cancellation.
    5. The polling loop exits without reading the answer and returns “The question was cancelled.” The input remains durably delivered and the blocker answered, although the server discarded its answer.

    The timer await permits the notification handler to run between response publication and consumption. Exclusive file creation protects the claim file, but the handler changes its in-memory cancellation state independently of the claim outcome. The existing “already claimed for an answer” test checks only the claim contents; it awaits the tool result without asserting that the answer survives.

    static trace: traced both sides of the exchange and the supplied late-cancellation test. This identifies an avoidable server-side discard; it does not assume that ProPR can guarantee consumption by an independently cancelling MCP client.

  • Minimum fix: Make cancellation state depend on winning the exclusive cancellation claim. If the answer claim already exists, keep the server waiting for the published answer. Extend the late-cancellation test to assert the returned answer and delivery state, including cancellation between claim creation and response publication.

Suggestions

These are optional follow-ups and are not sent to /fix.

S5: 🟢 Validate the actual Claude integration

A disposable-container smoke test would complement the substantial process and scripted-session coverage. Verify tool discovery, answering, pause, and timeout through the pinned Claude CLI, especially its per-server timeout configuration and container filesystem permissions. This is additional integration confidence, not a separately demonstrated defect.

S6: 🟢 Align setting validation limits

The MCP schema caps goal_question_max_wait_ms at 30 days, while CLI validation accepts safe integers above that limit and REST uses an infinite upper bound. Sharing a documented range would make configuration behavior more predictable. This is optional consistency work because the execution path separately bounds the effective wait.

Score

The implementation has substantial coverage and coherent lifecycle handling, but the cancellation arbitration can discard an answer already recorded as delivered. A focused correction and regression test should address the blocker.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 13s
  • Tokens: 80,317 (78,809 in / 1,508 out)
  • Cost: $0.73

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F3 S5 S6

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 417bbdc

Addressed 1 AI review comment (IDs: 6810430932)

Addressed finding F3

Summary of Changes

I fixed F3. If the operator's answer has already claimed the question, a cancellation that arrives afterwards no longer makes the server throw that answer away.

The fix (packages/core/src/agents/impl/utils/operatorQuestionMcpServer.ts, in the inline server source):

  • Who decides: claimCancelled now returns whether it won the claim. It creates the claim file exclusively (open(..., 'wx')), and only creating that file counts as winning. What gets written into it afterwards is just for information, which matches how the worker already reads claims: any claim it didn't create counts as a cancellation.
  • The cancellation handler sets wait.cancelled only if claimCancelled won. If the claim already exists, it belongs to the worker's answer, so the call keeps polling and returns the answer once the response file appears. This also covers a cancellation that lands after the claim is created but before the response is written.
  • Duplicate notifications: a separate cancelling flag stops two notifications for the same call from both trying to claim.
  • If the claim can't be written for any reason other than "already exists", the call keeps waiting rather than cancelling. Nothing was recorded, so the worker may still claim the question for an answer, and the server's own deadline still applies.

Checked for the same problem elsewhere: the worker's answer already lets the exclusive claim decide (claimForAnswer, and closeCancelled when it loses). Timeouts and closeOpen write no_answer/closed without taking a claim. A cancellation arriving after those ends the call without using up any input, so they don't have this problem.

Tests (test/claudeOperatorQuestions.test.ts):

  • The existing late-cancellation test now also checks that the tool returns The operator answered:\nDone., that the input is marked delivered, and that the blocker is resolved as answered.
  • A new test covers a cancellation between the claim and the published answer. It creates the answered claim by hand, sends the cancellation, checks the call is still waiting after 1.5 s (three polls), then publishes the response and checks the call returns that answer.
  • Both tests fail against the previous server code and pass with the fix.

Verification: claudeOperatorQuestions.test.ts passes (27/27), claudeNativeGoal.test.ts passes (27/27), tsc --noEmit for packages/core is clean, and eslint --max-warnings 0 is clean for the changed core file. The root test/ directory isn't covered by any eslint config.

As the finding says, an MCP client that cancels a call may still ignore the response. This fix only makes sure the server doesn't throw the answer away on its own side.

There's nothing visual to preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 5m 23s
  • Tokens: 770,205 (761,148 in / 9,057 out)
  • Cost: $0.62

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…e question, a cancellation that arrives afterwards no longer makes the server throw that answer away.

I fixed F3. If the operator's answer has already claimed the question, a cancellation that arrives afterwards no longer makes the server throw that answer away.

**The fix** (`packages/core/src/agents/impl/utils/operatorQuestionMcpServer.ts`, in the inline server source):
- **Who decides:** `claimCancelled` now returns whether it won the claim. It creates the claim file exclusively (`open(..., 'wx')`), and only creating that file counts as winning. What gets written into it afterwards is just for information, which matches how the worker already reads claims: any claim it didn't create counts as a cancellation.
- **The cancellation handler** sets `wait.cancelled` only if `claimCancelled` won. If the claim already exists, it belongs to the worker's answer, so the call keeps polling and returns the answer once the response file appears. This also covers a cancellation that lands after the claim is created but before the response is written.
- **Duplicate notifications:** a separate `cancelling` flag stops two notifications for the same call from both trying to claim.
- **If the claim can't be written** for any reason other than "already exists", the call keeps waiting rather than cancelling. Nothing was recorded, so the worker may still claim the question for an answer, and the server's own deadline still applies.

**Checked for the same problem elsewhere:** the worker's `answer` already lets the exclusive claim decide (`claimForAnswer`, and `closeCancelled` when it loses). Timeouts and `closeOpen` write `no_answer`/`closed` without taking a claim. A cancellation arriving after those ends the call without using up any input, so they don't have this problem.

**Tests** (`test/claudeOperatorQuestions.test.ts`):
- The existing late-cancellation test now also checks that the tool returns `The operator answered:\nDone.`, that the input is marked delivered, and that the blocker is resolved as `answered`.
- A new test covers a cancellation between the claim and the published answer. It creates the `answered` claim by hand, sends the cancellation, checks the call is still waiting after 1.5 s (three polls), then publishes the response and checks the call returns that answer.
- Both tests fail against the previous server code and pass with the fix.

**Verification:** `claudeOperatorQuestions.test.ts` passes (27/27), `claudeNativeGoal.test.ts` passes (27/27), `tsc --noEmit` for `packages/core` is clean, and eslint `--max-warnings 0` is clean for the changed core file. The root `test/` directory isn't covered by any eslint config.

As the finding says, an MCP client that cancels a call may still ignore the response. This fix only makes sure the server doesn't throw the answer away on its own side.

There's nothing visual to preview.

PR: #3452
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Claude operator questions through a local MCP exchange, integrates them with goal blockers and input delivery, and documents the new setting. It needs a localized correctness fix before merge: the server can finish waiting without notifying the worker, allowing a later input to be consumed as an answer nobody receives.

✅ Input ordering — The persisted blocker boundary prevents inputs queued before a question from becoming its answer.

✅ Cancellation arbitration — Exclusive claim files coordinate cancellation against answer publication, with tests covering both orderings.

✅ Scope control — Tool injection is restricted to goal execution, and tests check that task arguments remain unchanged.

The supplied checks show 34 passed, none failed, and one pending. This review is a static analysis of the supplied code; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F4: 🔴 Server timeout can consume undeliverable answers

  • Required behavior: Operator input must only be consumed as a question answer while the tool call still waits for that answer; finished questions must stop appearing as actionable blockers.

  • Evidence: packages/core/src/agents/impl/utils/operatorQuestionMcpServer.ts, ask; packages/core/src/agents/impl/claudeOperatorQuestions.ts, sync and answer.

    1. A question uses the supported 60-second maximum wait, with ample attempt time remaining. The server starts its deadline when it writes the request: approximately 90 seconds including grace.
    2. The worker discovers the request, but its awaited control.reportBlocker(...) takes 40 seconds to complete. After that await, sync calculates ownExpiry = this.now() + this.launch.maxWaitMs, placing worker expiry at approximately 100 seconds.
    3. At approximately 90 seconds, the server returns noAnswer(...) and removes the call from waits. It creates no terminal claim or other notification for this timeout.
    4. Before worker expiry, the operator submits input while the goal turn remains active. reconcileCancelled finds no claim, and answer creates an answer claim, writes a response, marks the input delivered, and resolves the blocker as answered.
    5. The MCP call already returned, so nothing reads that response. The operator's input is consumed without reaching Claude, and the durable delivery record incorrectly reports an answered question.

    The interruption point is the awaited blocker report; the separate server process continues measuring its deadline during that await. This sequence does not require ownership loss. The 30-second grace does not cover a longer reporting delay, and cancellation arbitration cannot detect timeout because the timeout branch never creates a claim. Delayed initial discovery has the same underlying problem.

    static trace: Both deadlines and all subsequent state changes follow directly from the supplied implementations. The existing server-fallback test verifies timeout in isolation but does not reconnect the worker afterward. proposed regression: Delay blocker reporting beyond the grace period, let the server return no-answer, then submit input and assert it remains ordinary goal input.

  • Minimum fix: Make server timeout publish a terminal state through the same exclusive arbitration used for cancellation before returning no-answer. Reconcile that state before reporting or answering questions, so a timeout that wins prevents input consumption and closes any existing blocker.

Suggestions

These are optional follow-ups and are not sent to /fix.

S7: 🟢 Exercise the actual Claude runtime

The process-level and scripted-session tests cover substantial behavior, but they bypass Claude's MCP configuration and client lifecycle. A disposable authenticated goal covering tool discovery, answering, cancellation, and timeout would strengthen integration confidence. This is optional validation beyond the demonstrated code correction.

S8: 🟢 Align setting validation limits

toolsManagement.ts caps the setting at 30 days, while REST and CLI validation accept larger safe integers. Sharing one upper-bound policy would make configuration surfaces easier to understand. This is non-blocking because ordinary supported values work across all surfaces and execution applies an additional attempt bound.

Score

The implementation has strong scope control and focused tests, but timeout reconciliation can lose operator input and requires correction. The supplied passing checks do not cover that sequence.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 12s
  • Tokens: 80,519 (78,830 in / 1,689 out)
  • Cost: $0.76

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F4 S7 S8

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit cfbcf56

Addressed 1 AI review comment (IDs: 6810882102)

Addressed finding F4

Summary of Changes

I fixed F4. When the server's own deadline runs out, it now has to win the same exclusive claim that cancellation uses before it returns "no answer". So a timed-out question can no longer swallow the operator's next input, and its "Needs you" blocker closes.

Server side (operatorQuestionMcpServer.ts)

  • When the deadline passes, the server tries to create the claim file with the content timed_out. It returns no-answer only if it wins.
  • If the worker's answer claim got there first, the server waits up to 30 more seconds for that answer to be written, then gives up. Before, it would have dropped an answer that was already being delivered.
  • Cancellation and timeout now share one claim function. It writes the content to a temporary file and hard-links it into place, so the claim never exists without its content. If hard links aren't available, it falls back to the old create-then-write method.

Worker side (claudeOperatorQuestions.ts)

  • The worker now reads what the claim says. A timed_out claim closes the blocker as question_timed_out; any other claim it didn't create still closes as provider_resolved.
  • This check already runs in three places, and all of them now handle timeouts:
    • when a request is first discovered, so a question that timed out before the worker saw it never becomes a blocker.
    • at the end of sync, after the slow reportBlocker await in your scenario.
    • at the start of answer, and again if the worker loses the answer claim.

Tests (test/claudeOperatorQuestions.test.ts), four new regressions:

  • Your scenario: blocker reporting is held until the server has returned no-answer. The blocker closes as question_timed_out, the next input returns false, nothing is marked delivered and no response file is written.
  • No sync in between: an input that arrives after a server timeout the worker hasn't synced yet is still not consumed.
  • Late discovery: a request the server already timed out never becomes a blocker.
  • Answer claim wins: when the worker claimed the answer just before the deadline, the call keeps waiting and returns the answer.

Verification: all four new tests fail on the previous code and pass now. The operator-questions suite passes (31/31), as does test/claudeNativeGoal.test.ts (27/27). The core and root typechecks are clean, and core eslint --max-warnings 0 is clean for both source files. The root eslint config skips files under test/, so the test file wasn't linted.

One leftover edge case: if hard links aren't available and the worker reads a timeout claim in the brief moment before its content is written, the blocker is labelled provider_resolved instead of question_timed_out. It still closes and the input is still not consumed.

No other independent problems turned up, and the UI didn't change, so there's no preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 6m 36s
  • Tokens: 916,316 (901,582 in / 14,734 out)
  • Cost: $0.80

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… has to win the same exclusive claim that cancellation uses before it returns "no answer". So a timed-out question can no longer swallow the operator's next input, and its "Needs you" blocker closes.

I fixed F4. When the server's own deadline runs out, it now has to win the same exclusive claim that cancellation uses before it returns "no answer". So a timed-out question can no longer swallow the operator's next input, and its "Needs you" blocker closes.

**Server side** (`operatorQuestionMcpServer.ts`)
- When the deadline passes, the server tries to create the claim file with the content `timed_out`. It returns no-answer only if it wins.
- If the worker's answer claim got there first, the server waits up to 30 more seconds for that answer to be written, then gives up. Before, it would have dropped an answer that was already being delivered.
- Cancellation and timeout now share one claim function. It writes the content to a temporary file and hard-links it into place, so the claim never exists without its content. If hard links aren't available, it falls back to the old create-then-write method.

**Worker side** (`claudeOperatorQuestions.ts`)
- The worker now reads what the claim says. A `timed_out` claim closes the blocker as `question_timed_out`; any other claim it didn't create still closes as `provider_resolved`.
- This check already runs in three places, and all of them now handle timeouts:
  - when a request is first discovered, so a question that timed out before the worker saw it never becomes a blocker.
  - at the end of `sync`, after the slow `reportBlocker` await in your scenario.
  - at the start of `answer`, and again if the worker loses the answer claim.

**Tests** (`test/claudeOperatorQuestions.test.ts`), four new regressions:
- **Your scenario:** blocker reporting is held until the server has returned no-answer. The blocker closes as `question_timed_out`, the next input returns `false`, nothing is marked delivered and no response file is written.
- **No sync in between:** an input that arrives after a server timeout the worker hasn't synced yet is still not consumed.
- **Late discovery:** a request the server already timed out never becomes a blocker.
- **Answer claim wins:** when the worker claimed the answer just before the deadline, the call keeps waiting and returns the answer.

**Verification:** all four new tests fail on the previous code and pass now. The operator-questions suite passes (31/31), as does `test/claudeNativeGoal.test.ts` (27/27). The core and root typechecks are clean, and core eslint `--max-warnings 0` is clean for both source files. The root eslint config skips files under `test/`, so the test file wasn't linted.

**One leftover edge case:** if hard links aren't available and the worker reads a timeout claim in the brief moment before its content is written, the blocker is labelled `provider_resolved` instead of `question_timed_out`. It still closes and the input is still not consumed.

No other independent problems turned up, and the UI didn't change, so there's no preview.

PR: #3452
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements operator questions across Claude goal execution, blocker tracking, input delivery, settings, and documentation. The supplied code supports merge readiness, conditional on the remaining validation check completing successfully.

✅ Input boundaries — Questions use the durable boundary returned by reportBlocker, preserving earlier queued inputs as ordinary corrections.

✅ Cancellation and timeout handling — Exclusive claim files arbitrate answers against server cancellation and timeout; the added tests cover these competing paths.

✅ Scoped integration — Tool injection is explicitly restricted to goal mode, with tests asserting unchanged task-mode launch arguments.

This was a static review of the supplied diff and context; no commands or tests were run. The authoritative checks report 34 passed, none failed, and one pending.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S9: 🟢 Exercise the actual container integration

A disposable goal using the pinned Claude runtime would strengthen confidence in tool discovery, cross-user filesystem permissions, MCP timeout configuration, and pause/resume behavior. The process-level server tests and scripted protocol tests cover substantial behavior, but the PR summary explicitly reports no live-container validation. This is additional integration evidence, not a demonstrated code blocker.

S10: 🟢 Align setting validation limits

packages/api/mcp/toolsManagement.ts caps goal_question_max_wait_ms at 30 days, while REST validation and the CLI permit larger values. Consider sharing an explicit maximum or documenting the difference so operators encounter consistent validation across interfaces. This is non-blocking because ordinary values, including the default, work across all interfaces and execution independently bounds the wait by the attempt deadline.

Score

The implementation has substantial lifecycle and race coverage, clear scope isolation, and no verified merge blocker in the supplied code. Remaining uncertainty concerns live runtime integration; the pending check has not reported a failure.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 46s
  • Tokens: 82,383 (81,549 in / 834 out)
  • Cost: $0.75

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S9 S10

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 12, 2026
@integry
integry merged commit 2e6aef9 into 3435-epic-let-claude-r1k Nov 12, 2026
50 checks passed
@integry
integry deleted the 3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6 branch November 12, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant