Repository navigation
feat(crews): seats ask their Captain instead of the person - #348
Merged
Merged
Conversation
bryantderosier
requested review from
BastiHu,
Jacksondr5 and
tyler-barton-horizon
September 28, 2026 15:41
bryantderosier
added this pull request to stack #310
September 28, 2026 15:41
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: Jacksondr5/j5code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Comment |
This was referenced Sep 28, 2026
A Crew seat runs out of the person's view, so a native question it raises waits unseen in its own thread. Per Jackson's decision on #325, a seat that needs a decision asks its Captain with send_message; the Captain answers or asks the person inline in the Captain thread. The J5 runtime-policy resolver marks a live seat's policy with crewSeat and appends the ask-your-Captain rule to its standing instructions. Claude seats run with disallowedTools AskUserQuestion; Codex seats get features.default_mode_request_user_input = false and tools.experimental_request_user_input.enabled = false in their thread config. The seat brief says the same for every harness. Recorded as FORK.md case 47. Closes #325 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bryantderosier
force-pushed
the
j5/crews-seats-ask-captain
branch
from
September 28, 2026 17:18
fae11c4 to
353125e
Compare
bryantderosier
added a commit
that referenced
this pull request
Sep 29, 2026
Conflicts: FORK.md takes main's proposal-flow paragraph with this branch's Full-access default for custom seats; crews.md keeps this branch's Definition sentence and adds #348's rule that seats ask their Captain, and keeps both 2026-09-26 History lines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Problem
A Crew seat that raised a native question (Claude's
AskUserQuestion, Codex'srequest_user_input) blocked in its own thread, which nobody watches. Jackson's decision on #325 is that seats don't get native question tools: a seat asks its Captain, and the Captain answers or asks the person inline. #308/#309 were slimmed to seat approvals on the same assumption, so without this a seat question stalls the Crew.What I changed
apps/server/src/j5/a2a/crewSeatRuntime.ts→makeCrewSeatLookup/withCrewSeatQuestions, J5-owned and wired in throughagentPersonaRuntime.ts(already behind upstreamRuntimePolicy.ts):crewSeat: true.agentPersonaInstructions: "questions go to your Captain" withsend_messageandexpect_reply=true.ClaudeAdapterV2.ts→openQuerypassesdisallowedTools: ["AskUserQuestion"]for seats only.CodexAdapterV2.ts→codexThreadRuntimeParamsaddsJ5_CODEX_CREW_SEAT_CONFIGto the threadconfignext tomcp_servers:"features.default_mode_request_user_input": falseand"tools.experimental_request_user_input.enabled": false. They're dotted keys, so the user's own[features]/[tools]tables stay intact.ProviderAdapter.ts: an optionalcrewSeatflag on the runtime policy.spawnIds.ts→spawnFirstTurnText: the seat brief's<crew_collaboration>says to ask the Captain, never the person or a native question tool.crews.md(Definition, AC9, History) and the Crews section ofdocs/user/personas.md.Why this shape
Invariants
J5_CODEX_CREW_SEAT_CONFIG).Surfaces
packages/contracts)ClaudeAdapterV2.ts,CodexAdapterV2.ts,ProviderAdapter.ts(plus the Claude adapter test), recorded as case 47.Out of scope
ExitPlanMode, which isn't a question tool. Its plan approval would still be asked in the seat's own thread.spawnBriefWithoutCrewContext(touched here to ignore<crew_collaboration>in brief comparisons) is deleted by fix(crews): a proposal launches once and reports every seat #313. Whichever of the two stacks lands second drops this hunk.Upgrade and data
None. Existing seats pick up the rule on their next session start.
Verification
apps/server,apps/web, andpackages/contractstypecheck (exit 0).vp test run apps/server/src/j5 apps/web/src/j5 apps/server/src/orchestration-v2/Adapters: 1,564 passed, 1 skipped. Lint is clean.AskUserQuestiononly from a seat. This test fails with the adapter line removed.codex app-serverdriven over stdio the way the adapter does, a Default-mode collaboration setting, and a throwawayCODEX_HOME. The prompt asked the model to ask one question.item/tool/requestUserInput)tools.experimental_request_user_input.enabled=falseThe model also lists a
request_user_input_asynctool, but it never raised a request in any run, so the fragment covers what actually blocks.Review focus
crewSeatRuntime.ts: whether "agent/MCP-created thread in a live Crew" is the right test, and that it fails open (no seat) when the store can't be read.Closes #325
Claude Opus 5.5 via Claude Code in J5 Code
🤖 Generated with Claude Code