Registry Mirror
Skip to content

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Part of #808: the role-thread question rule, part 3, step 1 (left by #1355, "Left" item 2). Left after this PR: step 2, which adds these lines with the fork seat after #1375 (the setting and the owner-question store) merges; then the owner's answer card ("Left" item 3).

What

Step 1 of adding a seam line. It changes only .github/fork-seams.json: it announces the lines the two adapters with a question tool need so that a question from a role thread does not hold the turn.

Why: a blocking question in an orchestrator or assistant thread stops the whole thread while the owner is away (one froze an orchestrator for a night, see the 11-28 comment on #808). With these lines, a question call from a thread that holds a role now is kept as an open owner question (#1355's rule, #1375's store) and the call gets "not answered yet" at once; the answer comes later as a message. Other providers have no question tool, so they need nothing.

File Line (announced) What it does in step 2
ClaudeAdapterV2.ts import * as RoleQuestionSeat from "../../fork/roleQuestionSeat.ts"; // Fork: role-thread questions the seat lives in a fork file
const roleQuestions = yield* RoleQuestionSeat.make; // Fork: role-thread questions made once, beside mcpProfiles; it reads its services with Effect.serviceOption, so the adapter gains no requirement (none provided: every call waits)
const kept = yield* roleQuestions.claude(context, callbackOptions, toolInput); // Fork: role-thread questions first line in the AskUserQuestion branch of canUseTool: runs keepRoleQuestion for the turn's thread and the call's toolUseID
if (kept !== null) return kept; // Fork: role-thread questions a kept question returns its PermissionResult (the reply as the tool's result) before upstream builds its request card; null falls through to upstream's wait
CodexAdapterV2.ts the same import and make line made beside continuationRequests in makeCodexAdapterV2
const kept = yield* roleQuestions.codex(context, payload); // Fork: role-thread questions in the item/tool/requestUserInput handler, after its turn check
if (kept !== null) return kept; // Fork: role-thread questions a kept question returns a ToolRequestUserInputResponse with the reply as each question's answer; null waits as upstream does

Each line fits the 100-column width at its place, so the formatter keeps it on one line.

State question

There is no code in this PR. In step 2: the seat answers from keepRoleQuestion, which writes the record before it replies and turns any failure into upstream's wait, so a stop half-way loses no question and gives no reply. A replay of the same tool call (same toolUseID / itemId) maps to the same record id, so it gets the stored reply (the answer, if the owner already answered) and never a second open question. With roleQuestionsWait on (the default), a thread with no role, or no services provided, every call waits exactly as upstream's does.

Tests

List only. The seam-check tests run on this tree: they refuse an announced line that is already in its file and a line in both added and announced. Run here: node --test .github/scripts/fork-schema-check.test.cjs .github/scripts/fork-upstream-files-check.test.cjs .github/scripts/fork-seam-check.test.cjs (201 pass), and the schema, upstream-files and seam checks against main (all green). vp fmt --check on the changed file is clean. The question these answer: may a later pull request add exactly these lines to these two upstream files, and no others?

🤖 Generated with Claude Code

… Codex adapters (#808)

Step 1 of adding the seam lines for the role-thread question rule (part 3,
left by #1355): a question call from a thread that holds a role now (the
assistant or a project orchestrator) is kept as an open owner question and
answered at once with "not answered yet", so the thread does not wait for
the owner. List only; step 2 adds the lines with the fork seat
apps/server/src/fork/roleQuestionSeat.ts, after the store (#1375) merges.

- ClaudeAdapterV2.ts: an import, the seat made beside mcpProfiles, and two
  lines first in the AskUserQuestion branch of canUseTool.
- CodexAdapterV2.ts: an import, the seat made beside continuationRequests,
  and two lines in the item/tool/requestUserInput handler after its turn
  check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby scuttletoby added the fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) label Nov 30, 2026
@scuttletoby
scuttletoby merged commit 23ac44d into main Nov 30, 2026
27 checks passed
@scuttletoby
scuttletoby deleted the fork/808-role-question-seams-announce branch November 30, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork:merge-ready Merge conveyor: lenses done, merge when green (PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant