Repository navigation
[3435 by Claude Opus 5.5] Give Claude goal runs an ask_operator tool backed by goal blockers - #3452
Conversation
…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.
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Full Test Suite Shard 2/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 760eb63 Summary of ChangesI fixed the Shard 2/4 failure. The failing test was Cause: that test checks every snake_case name in
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:
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
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Question timeout can outlive the attempt
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise the actual Claude runtimeThe 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 propagationThe inline server handles ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 621da5e
Summary of ChangesI 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
New tests in
Verification:
The UI didn't change, so there is no visual preview. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 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
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Cancelled questions still consume operator input
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Exercise the deployed Claude runtimeA 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 limitsThe 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. ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit ea44cfa
Summary of ChangesF2 is fixed. When Claude's MCP client cancels an How it works
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
All five fail against the previous code. With the fix, the file passes 26/26, Separate discovery, not changed: the timeout and There's no visual preview because the UI didn't change. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 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
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Cancellation ignores an answered claim
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Validate the actual Claude integrationA 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 limitsThe MCP schema caps ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 417bbdc
Summary of ChangesI 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 (
Checked for the same problem elsewhere: the worker's Tests (
Verification: 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
💡 ProPR Slash Commands
🤖 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
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Server timeout can consume undeliverable answers
SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Exercise the actual Claude runtimeThe 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
ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit cfbcf56
Summary of ChangesI 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 (
Worker side (
Tests (
Verification: all four new tests fail on the previous code and pass now. The operator-questions suite passes (31/31), as does 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 No other independent problems turned up, and the UI didn't change, so there's no preview. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 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
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 ✅ 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 blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S9: 🟢 Exercise the actual container integrationA 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
ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3435
Branch:
3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6Commits: ✅ Changes committed (3c880d6)
AI Processing Completed
Execution Details:
Summary:
Claude goal runs now have an
ask_operatortool. 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 0is clean for the touched files.How it works
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 asgoalBlockers.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./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 asnodeinside the container, so the request directory is writable by others but can't be listed, and the directory names are random.MCP_TIMEOUTonly covers startup. Tool calls have a per-servertimeoutthat 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 thattimeoutabove the maximum wait.claudeOperatorQuestions.ts): this follows the Codex behaviour.questionblocker withsend_inputamong its actions, fenced to the run generation, claim and session.turn_ended/attempt_ended) and the tool call fails cleanly. A replaced attempt is closed by the existingsuperseded_by_attemptpath.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_settingsandpropr setting update, and is listed in the settings catalog.buildDockerArgsadds the tool only whenexecutionMode === 'goal'. A test checks that task-mode arguments are identical with or without the option.GOAL_BLOCKER_PROVIDER_SUPPORTnow lists Claude questions assupported; approvals stay unavailable.get_goal_capabilitieshas a newcontrols.operatorQuestionsfield, true for Codex and Claude.goals.md(new "Claude questions" section and the provider table),mcp.md,propr-cli.mdand the CHANGELOG, and regeneratedsettings-locations.md.Things to know
answeredandquestion_timed_out, are stored for audit./tmp/claude-logsread-write. Another container could therefore, in principle, write into a goal's exchange directory if it knew the random name.Tests
test/claudeOperatorQuestions.test.tscovers: 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.tsgains 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.goalBlockers,goalExecutionModeandconfigRoutes.followup, and added a validation test for the setting in the CLI.Detailed Logs:
7b49d336-7464-4040-9b29-4292ab8ec6beLog files stored at:
/usr/src/app/logs/executions/issue-3435-2026-11-11T22-28-39-346Z-conversation.json/usr/src/app/logs/executions/issue-3435-2026-11-11T22-28-39-346Z-output.txtLatest Conversation Messages
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!