You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
observe: what an unanswered question asks, on its part, and pending requests whose turn ended #263
Ferry runs claude and codex in full-permission mode. They don't ask for approvals, but a question (an MCP server's elicitation through claude control_request subtype elicitation, codex mcpServer/elicitation/request / item/tool/requestUserInput) still blocks the turn: oar records the toApp request and answers nothing (by design until a host-answer API exists), so status stays running until the host stops the turn.
Showing that state well from @botiverse/oar/observe (0.45.1) runs into three gaps:
The app_request view part never carries its body.ViewPart declares body?: unknown on app_request, but session-view-events.ts pushes the part without it; only pendingRequests[].body (filled by recordFacts) has it, and only while unanswered. A host that presents a turn from the turn alone (Ferry's iOS bridge diffs by message identity) can't say what was asked without reaching into the view.
No words for what a request asks.appRequestKind maps each runtime's request types to approval/question/service, but the text of the ask lives in runtime-native bodies only oar knows (request.message for claude, message for codex/ACP elicitation, questions[0].question for codex requestUserInput). Ferry now reads these itself (packages/core/src/asks.ts, questionText), which is exactly the per-runtime knowledge appRequestKind's doc says belongs in oar.
pendingRequests keeps requests whose turn ended. After the host aborts a turn holding an unanswered question (claude cancels its elicitation on interrupt; no response record is written), the request stays in SessionView.pendingRequests for the rest of the run, so pendingRequests.length > 0 no longer means "someone is waited on". Ferry now only counts the open turn's unanswered requests.
Suggestion
Fill body on the app_request part (the same native body pendingRequests gets).
Export something like appRequestText(type, body): string | undefined (or a { kind, text } reading) beside appRequestKind, covering claude/codex/ACP elicitation and codex requestUserInput (and the tool name of an approval).
Either drop a pending request at its root turn's end, or mark it (turnEnded: true) so a host can tell a live ask from a dead one without re-deriving turn membership.
Context: Ferry D101 (botiverse/ferry, branch stuck-question); the host-answer API itself is Ferry roadmap D013.
All three, with one change to the third: the end of a pending request comes from the runtime's own report, never from the turn ending.
body on the app_request part.ViewPart declares it and the fold never fills it: a bug. Fill it with the same native body pendingRequests carries.
appRequestText(type, body): string | undefined beside appRequestKind, same rationale: which field holds the ask is per-runtime knowledge only OAR has. Questions: claude elicitationrequest.message; codex mcpServer/elicitation/requestmessage; codex item/tool/requestUserInput every questions[].question, one per line; ACP elicitation/createmessage (none arrive today: OAR advertises no elicitation). Approvals, where the native field names the action plainly: claude can_use_toolrequest.tool_name, codex item/commandExecution/requestApprovalcommand, ACP session/request_permissiontoolCall.title. Each source cited from the schema or a recorded frame; anything else is undefined, never a guess.
A request the runtime withdrew leaves pendingRequests, on the runtime's word. Both runtimes say so themselves and OAR drops it today:
claude writes {"type":"control_cancel_request","request_id":…} when it cancels a request it sent (2.1.292 has three emitters); OAR records it as a frame with no event.
codex 0.160.1 notifies serverRequest/resolved {threadId, requestId} (v2/ServerRequestResolvedNotification). OAR never answers a codex request, so this always means codex cleared it.
New event app_request_cancelled {requestId} read off those frames; SessionView removes the request from pendingRequests and settles its part as cancelled. The process exit also settles every pending request (whoever asked is gone). Not "drop at turn end": a runtime may keep a request open across a turn boundary, and inferring it from the turn would put a guess in the view.
Verification: a claude probe that interrupts a turn holding an elicitation and shows the cancel frame; a codex fixture for serverRequest/resolved. Taking this myself after oar#262; both ship in the same release for Ferry.
Activity
xxchan commentedon Oct 9, 2026
Decided
All three, with one change to the third: the end of a pending request comes from the runtime's own report, never from the turn ending.
bodyon theapp_requestpart.ViewPartdeclares it and the fold never fills it: a bug. Fill it with the same native bodypendingRequestscarries.appRequestText(type, body): string | undefinedbesideappRequestKind, same rationale: which field holds the ask is per-runtime knowledge only OAR has. Questions: claudeelicitationrequest.message; codexmcpServer/elicitation/requestmessage; codexitem/tool/requestUserInputeveryquestions[].question, one per line; ACPelicitation/createmessage(none arrive today: OAR advertises no elicitation). Approvals, where the native field names the action plainly: claudecan_use_toolrequest.tool_name, codexitem/commandExecution/requestApprovalcommand, ACPsession/request_permissiontoolCall.title. Each source cited from the schema or a recorded frame; anything else isundefined, never a guess.A request the runtime withdrew leaves
pendingRequests, on the runtime's word. Both runtimes say so themselves and OAR drops it today:{"type":"control_cancel_request","request_id":…}when it cancels a request it sent (2.1.292 has three emitters); OAR records it as a frame with no event.serverRequest/resolved {threadId, requestId}(v2/ServerRequestResolvedNotification). OAR never answers a codex request, so this always means codex cleared it.New event
app_request_cancelled {requestId}read off those frames; SessionView removes the request frompendingRequestsand settles its part as cancelled. The process exit also settles every pending request (whoever asked is gone). Not "drop at turn end": a runtime may keep a request open across a turn boundary, and inferring it from the turn would put a guess in the view.Verification: a claude probe that interrupts a turn holding an elicitation and shows the cancel frame; a codex fixture for
serverRequest/resolved. Taking this myself after oar#262; both ship in the same release for Ferry.feat: app_request_cancelled, the ask's body on its part, appRequestTe…
chore: release v0.46.0 (#269)