Skip to content

Give Claude goal runs an ask_operator tool backed by goal blockers #3435

Closed

Description

@integry

Problem

A Codex goal can ask the operator a question: the request is recorded as a goal blocker, shown under "Needs you", and answered with goal input. Claude goals cannot, because the session runs headless with permissions bypassed and no question channel. GOAL_BLOCKER_PROVIDER_SUPPORT and the docs list Claude as unavailable.

Goal

Claude goal runs can call an ask_operator tool that blocks until the operator answers, using the existing goal_blockers store, attention projection, UI and send_goal_input.

Acceptance criteria

  • Claude goal sessions are launched with an injected MCP server exposing one tool, ask_operator, taking one question (text, optional 2-10 options) and returning the operator's answer as text. Bounds match goalBlockers.ts (1000 characters, 10 options).
  • The tool is injected in goal mode only. Ordinary task runs (issue implementations, PR follow-ups, /fix, reviews, merge-conflict resolution, automations) are always one-shot and never receive it; a test asserts the task-mode launch arguments are unchanged.
  • The transport works in restricted network mode and does not require the ProPR API to be reachable from the container (for example an inline stdio server, like the repository scout, exchanging request and response files through the existing bind-mounted log directory). No new credentials are placed in the container.
  • When the tool is called, the worker records a goal blocker of category question with responseActions including send_input, fenced to the current run generation, claim and session like Codex blockers.
  • The next operator input after the blocker's input boundary is delivered as the tool result and marked delivered; the blocker is resolved. Input that arrives with no open question keeps today's behaviour (delivered as a mid-turn correction).
  • While waiting, the goal keeps heartbeating and is not treated as stalled or nudged with the continue prompt. Pause and cancel work while a question is open and close the blocker.
  • If the attempt ends or is superseded, the blocker is closed with the existing reasons and the tool call fails cleanly.
  • A configurable maximum wait (instance setting, default 24 hours, bounded by the agent deadline) returns a clear "no answer" result to the agent so it can continue with a stated assumption or stop.
  • Secrets: the tool description tells the agent never to ask for credentials; answers are stored as goal input like any other.
  • GOAL_BLOCKER_PROVIDER_SUPPORT, get_goal_capabilities (new field indicating question support) and the provider tables in docs/docs/features/goals.md and docs/mcp.md are updated for Claude.
  • The goal prompt tells Claude when to use the tool: only for decisions it cannot resolve from the goal, the repository or sensible defaults.
  • Tests cover the tool round trip, fencing, timeout, pause/cancel while waiting, attempt end, and the capability projection.

Out of scope

Implementation

Key files: packages/core/src/agents/impl/claudeNativeGoal.ts (ClaudeGoalStream.onLine, ClaudeGoalProtocol.deliverInputs, observeTurn, settleTurn, continue-nudge logic), packages/core/src/agents/impl/utils/dockerArgsBuilder.ts (goal args; repository scout MCP wiring), packages/core/src/agents/impl/utils/repositoryScoutMcpServer.ts (inline stdio MCP precedent), packages/core/src/agents/agentToolPolicy.ts (assertToolPolicySupported rejects tool policy in goal mode), packages/core/src/agents/impl/codexAppServerBlockers.ts (reference behaviour: CodexProviderRequests.answer, input boundary), packages/core/src/goals/goalBlockerStore.ts, packages/shared/src/goalBlockers.ts, packages/core/src/agents/types.ts (GoalBlockerReport, GoalExecutionControl.reportBlocker/resolveBlocker), src/jobs/goalAttemptState.ts, src/jobs/processGoalJob.ts, packages/core/src/agents/goalCapabilities.ts, src/goalRecovery.ts (stale-attempt detection). Check docs/library/claude/ (mcp.md, hooks.md, headless.md) for MCP tool-call timeout behaviour before choosing the wait mechanism; MCP_TIMEOUT covers startup only. Tests: test/goalBlockers.test.ts and the Claude native goal tests. Verify with the standard commands (test:prepare, typecheck, changed tests, eslint --max-warnings 0 per package).

Activity

  1. propr-dev commented on Nov 11, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3435/claude-opus-5-5-give-claude-goal-runs-an--20261111-2200-pg6
    • Base Branch: 3435-epic-let-claude-r1k
    • Worktree: issue-3435-20261111-2200-claude-opus-5-5-pg6

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions