Skip to content

feat(roadmap): an agent that needs a decision asks on the issue and waits #3077

Closed

Description

@dan-petty

What happened

When a plan needs an owner decision (a design choice, an unclear criterion) the only choice is to guess or to stop. A stop looks like a failure and sets status/blocked with a generic comment.

What should happen

  • A step can ask a question: it posts a comment with the options and evidence, sets status/needs-input (a new label in ADR 0016 and the workflow document) and ends. A reply from the owner, a member or a collaborator resumes the run with the answer in its context. Unanswered questions show in devops roadmap inbox.

Acceptance criteria

  • The label is declared in .github/labels.yml and in the workflow document (the invariant test passes).
  • A reply resumes the run in a replay test, and a reply from another user does not.
  • The question appears in the inbox with the command to answer it.
  • A question is limited per item (a setting).

Related: tracker for this set (filed with it), #2908 (issue workflow), #2867 (draft PR evaluator), #3005 (task kind), #3010 to #3015 (plan gates), #2919 (stuck-item metrics), #2953 (Ollama parser).

Alternatives check of 2026-11-04: partly.
Tool: langchain-ai/langgraph (https://github.com/langchain-ai/langgraph), MIT, last activity 2026-11-04, maintained.

Proposed design

Problem statement

A roadmap job that needs an owner decision has no way to ask. It guesses, or it stops with a generic comment that looks like a failure. This change adds one owner-question comment form: the question once, two or three options with their results, a recommendation and the evidence. The job posts the form once for each question hash, on the oldest item that asks it, and links it from the other items. devops roadmap inbox lists the open question as kind owner with the command to answer. A reply from the owner, a member or a collaborator resumes the covered items through refine with the answer in context. The open frame is the marker, so the change adds no status label.

Acceptance criteria

Requirement: Owner-question form

A roadmap job that needs an owner decision SHALL post one comment with the question once, two or three options and their results, a recommendation, the evidence and a hidden block with the question hash.

Scenario: A refine step asks a question

  • WHEN A refine step needs an owner decision.
  • THEN The comment holds the question text once, two or three options, a recommendation, at least one evidence link and a hidden block with the question hash.

Requirement: One frame for each question hash

The job SHALL post one question frame for each question hash, on the oldest open item that asks it, and MUST link it from every other item that asks the same question.

Scenario: Two items ask the same question

  • WHEN Two items ask a question with the same text and options.
  • THEN One comment holds the frame on the older item, the second item gets a comment with a link to that frame, and no second frame exists.

Requirement: A trusted reply resumes the item

A reply from a trusted user SHALL resume every item covered by the frame, with the answer in the context of the run.

Scenario: The owner answers

  • WHEN A user with author association OWNER, MEMBER or COLLABORATOR, who is not a bot and not the account that the job acts as, replies to an open frame.
  • THEN A refine run starts for each covered item with the answer text and the frame reference in its context, and the job record of each covered item holds the question hash and the answer.

Requirement: An untrusted reply does not resume

A reply from a user who is not trusted MUST NOT start a run.

Scenario: A stranger replies

  • WHEN A user whose author association is not OWNER, MEMBER or COLLABORATOR, or a bot, replies to an open frame.
  • THEN No run starts, the frame stays open, and the inbox still lists it.

Requirement: The inbox lists the open question

devops roadmap inbox SHALL list each open question frame as a line of kind owner with the item number, the age, the question summary and the command to answer.

Scenario: One open question

  • WHEN One item has an open question frame.
  • THEN The inbox shows one line with kind owner, the item number, the age, the question summary and the command gh issue comment <number> --body "<answer>".

Requirement: No new status label

The change MUST NOT add a status label, and the status family SHALL keep the six labels of ADR 0016.

Scenario: The label invariant test runs

  • WHEN tests/invariants/test_roadmap_workflow_doc.py compares .github/labels.yml with the workflow document and the code.
  • THEN The labels file and the code hold the same six status labels, and the document names each one.

Requirement: One question in one run

A step SHALL ask at most one question in one run and SHALL end after it posts the frame.

Scenario: A step needs two decisions

  • WHEN A step needs a second owner decision in the same run.
  • THEN The step posts one frame, ends, and asks the second question only after the first answer resumes the item.

Requirement: One form module for every asking job

Refine, stage and implement SHALL post the owner-question form through one module.

Scenario: The stage job asks a question

  • WHEN A stage step needs an owner decision.
  • THEN The stage step posts the same form as refine, with the same hash rule and the same hidden block.

Existing Tool Considered

LangGraph (https://github.com/langchain-ai/langgraph), MIT, maintained (last commit 2026-11-11). The alternatives check gave the verdict partly. It covers the pause and the resume: a run stops at a step, a checkpointer keeps the state, and the human reply returns as the resume value. It lacks the GitHub transport: it does not post the question as an issue comment, read the reply from the thread, list the question in devops roadmap inbox, check that the replier is trusted, or post one frame for each question hash. The change builds that plumbing itself: about 1,200 lines with tests, 180,000 to 260,000 tokens to build, 12,000 to 20,000 tokens for each of about 4 fix rounds, 4,000 to 6,000 tokens a month to keep, and 4 to 6 working days.

Key questions

  • Which scope does the item follow?: The scope of the plan feat(roadmap): track the issue stewards and persona selection #4780 (child 10), which the owner accepted on 2026-11-11. It replaces the original scope: one owner-question form, one frame for each question hash, an inbox line of kind owner, a resume from a trusted reply, and no new status label. The question resolver, stage and implement use the form; the answer step of the question resolver depends on this item. (proposed)
  • Which status marks an item that waits for an owner answer?: None. The change adds no status label. The item keeps its status, and the open question frame is the marker that the inbox reads. The status family stays the six labels of ADR 0016: New, Ready, Planned, In Progress, In Review and Blocked. (best practice) [sources: .github/labels.yml:241, docs/adr/0016-labels-hold-the-roadmap-items-fields.md:9, docs/ROADMAP_WORKFLOW.md:100, src/devops_cli/config/constants.py:3633, tests/invariants/test_roadmap_workflow_doc.py:191]
    • Rejected: A new status/needs-input label. ADR 0016 and .github/labels.yml hold six status labels. The accepted scope says no new label, and the label would need a change to the workflow-document invariant for no gain.
    • Chosen: No new label; the open frame is the marker. The inbox already lists a New item that waits on a person in refine. An unanswered frame is that wait.
  • Which users can resume a run with a reply?: The repository owner, a member of the owning organization and a collaborator: CONST_ROADMAP_TRUSTED_AUTHORS is OWNER, MEMBER and COLLABORATOR. The reply must not be a bot's and must not be the account that the job acts as. Any other reply stays on the thread and starts no run. [sources: src/devops_cli/config/constants.py:3832, src/devops_cli/roadmap/trust.py:64, docs/ROADMAP_WORKFLOW.md:64]
  • How does the job avoid a second frame for the same question?: Hash the question text and its options with hash_text, and record the hash and the frame URL in the job record of each covered item. The open-item listing already holds each issue's body and job record, so a round finds an existing frame for the hash with no extra request. Post the frame once, on the oldest open item that asks it, and post a link comment on each other item. (best practice) [sources: src/devops_cli/roadmap/body_hash.py:43, docs/adr/0016-labels-hold-the-roadmap-items-fields.md:12, docs/adr/0016-labels-hold-the-roadmap-items-fields.md:32, docs/ROADMAP_WORKFLOW.md:119]
    • Rejected: Post a frame on every item. The owner answers the same question many times, and the inbox shows many rows for one decision.
    • Chosen: One frame for each hash, linked from the other items. The owner answers once, and each item keeps a link to the answer.
  • Where does the answer go when it arrives?: Refine is the single reader: trusted_replies gives it the comments of trusted authors, and it records the answer in the frame and in the job record of each covered item. It resumes the covered items with the answer in its context. A stage or implement question is answered by the next round of that row, which reads the recorded answer; refine makes stage due when it sets an item Ready. (best practice) [sources: src/devops_cli/roadmap/trust.py:81, src/devops_cli/roadmap/refine/refine.py:2090, src/devops_cli/roadmap/run.py:17, CONTEXT.md:157]
    • Rejected: Each job reads its own replies. Three readers of one thread give three places to get the trust check wrong.
    • Chosen: Refine reads the reply and hands the answer on. The accepted scope says a reply resumes the item through refine. The job record carries the answer to the asking job.
  • How does the inbox show an open owner question?: As a line of kind owner with the item number, the age, the question summary and the command gh issue comment <number> --body "<answer>". The line stays until an answer from a trusted user arrives. The roadmap-inbox spec gains the class in its order. (best practice) [sources: openspec/specs/roadmap-inbox/spec.md:9, src/devops_cli/roadmap/inbox_kind.py:11, docs/roadmap/inbox.md:13]
    • Rejected: No inbox line. The owner has no single list of the questions that wait.
    • Chosen: A line of kind owner with the answer command. The inbox already lists alternatives questions and unapplied splits. A question row fits that list.
  • Is a per-item limit on questions still needed?: No new setting. A step asks at most one question in one run and ends, and refine's existing comment cap (CONST_ROADMAP_REFINE_MAX_COMMENTS_PER_ITEM, 2 comments in 24 hours) bounds the frames that refine posts on one item. The form carries refine's marker, so the cap counts it. (best practice) [sources: src/devops_cli/config/constants.py:3175, src/devops_cli/roadmap/refine/refine.py:2020, openspec/specs/roadmap-refine/spec.md:181]
    • Rejected: A per-item setting. The accepted scope does not hold it, and the one-question rule already bounds a run.
    • Chosen: One question per run and the existing comment cap. A step that needs a second answer asks after the first answer arrives, and the cap bounds the comments on one item.
  • Should the item adopt LangGraph for the pause and the resume?: No. LangGraph covers the pause and the resume only. The change builds the GitHub transport, the inbox line, the trust check and the hash rule itself, and it uses the interrupt and resume-value pattern of LangGraph as its model. (best practice) [sources: CONTEXT.md]
    • Rejected: Adopt LangGraph as a dependency. It adds a graph runtime and a checkpointer for a pause that the job record and the Service already hold. The transport stays to build.
    • Chosen: Use the pattern and build the transport. The parts that LangGraph covers are the small part of the need. The job record holds the state, and the Service starts the resumed run.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 6) uses this question record for refine and implement. The resolver schedule (#4809) waits for it.

  • Live proof: after the merge and the release, an agent job asks one question on a live item as the App and waits. A comment gives the question comment and the record entry.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. New workflow capability that removes a guess-or-stop gap but does not block existing operations.
    • Value: Medium. Prevents silent failures and gives owners a clear path to unblock agent runs.
    • Effort: Medium. Requires a new label, a step type, resume logic, inbox integration, and replay tests.
    • Related: feat(roadmap): devops roadmap inbox lists what waits for a person #2915, which asks for a different change. Both touch the devops roadmap inbox, but #2915 delivers the inbox listing command while this candidate delivers the agent ask-and-wait mechanism that feeds the inbox.
  3. added
    priority/p2-medium
    on Nov 1, 2026
  4. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 11dc347 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • The proposal has no problem statement, no acceptance criterion with its requirement, scenario, WHEN and THEN, or no answer to the existing-tool question. State the problem, the requirements with their scenarios, and the open tool that covers the need or the cost of building it.
  5. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Tool: langchain-ai/langgraph (https://github.com/langchain-ai/langgraph)

    • License: MIT
    • Last activity: 2026-11-04
    • Maintained: yes

    Covers:

    • Pausing a run at any step with interrupt() and waiting indefinitely for a human answer.
    • Persisting the paused run state with a checkpointer so the same run can be resumed later.
    • Passing the human's reply back into the paused node as the resume value, so the answer lands in the run's context.
    • Human-in-the-loop middleware with a respond/ask-user decision, alongside approve, edit and reject.

    Lacks:

    • No GitHub transport: it does not post the question as an issue comment or read the answer from the issue thread.
    • No status/needs-input label handling and no check that only the owner, a member or a collaborator can resume the run.
    • No devops roadmap inbox listing of unanswered questions or the command to answer them.
    • No per-item limit on how many questions a step may ask (the setting in the acceptance criteria).
    • The project must still build the comment/label/inbox plumbing and the replay tests around the interrupt.

    Searches run:

    • open source human-in-the-loop agent asks question on GitHub issue waits for reply resume
    • AI coding agent pauses for human input via issue comment approval workflow
    • LangGraph interrupt human-in-the-loop pause resume checkpointer agent question answer
    • GitHub Action agent replies to issue comment thread resume run human answer
    • open source bot agent asks clarifying question in GitHub issue comment and resumes when maintainer answers
    • multica agent asks structured clarifying question on issue answer resumes run

    Sources:

    Checked on 2026-11-04. A person decides what this means for the item. The check changes no label and closes no issue.

  6. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the issue stewards plan (2026-11-11)

    The issue stewards plan #4780 (child 10) replaces the scope of this item. The owner accepted the plan on 2026-11-11.

    Problem. The refine section of this item is a stub ("x"), and the item asks for a new status label. The 10 owner-only questions of the census of 2026-11-11 have no common form. Refine asked an answered question again on #4517, #4563 and #4624.

    New scope.

    • One owner-question comment form: the question one time, 2 or 3 options with their results, a recommendation and the evidence.
    • The job posts the form one time for each question hash across all items, on the oldest item. The other items link to it.
    • devops roadmap inbox lists the form as kind owner, with the command to answer.
    • A reply from a trusted user resumes the item through refine.
    • No new status label: ADR 0016 needs none.
    • The question resolver, stage and implement use the form.

    Acceptance criteria.

    • A test posts one frame for a question hash on two items, and links it from the second item.
    • The inbox lists the frame with kind owner.
    • A reply from a user that is not trusted does not resume the item.

    This item stays a sub-issue of #3027. The answer step of the question resolver (#4780) depends on it.

  7. added
    status/ready
    and removed
    status/new
    on Nov 11, 2026
  8. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at d83c7d9 (see proposed design in issue body).

  9. 58 remaining items

  10. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    This issue was merged to main in pull request #5617 (commit aba876a).

    Pull request #5617 had the title docs(openspec): plan #3077 and the body Plans #3077, which left this issue open.

    All 178 tests for owner questions pass on main:

    • tests/roadmap/test_owner_question.py
    • tests/roadmap/refine/test_roadmap_refine_owner_question.py
    • tests/roadmap/refine/test_roadmap_refine_owner_answer.py
    • tests/roadmap/stage/test_roadmap_stage_owner_question.py
    • tests/roadmap/implement/test_roadmap_implement_owner_question.py
    • tests/roadmap/test_roadmap_inbox.py
    • tests/invariants/test_roadmap_workflow_doc.py

    Closing this issue as completed per AGENTS.md rule 2.

  11. removed
    status/blocked
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions