Skip to content

sminos: a MAWS session's async asks read as the plugin's (board #76) - #243

Merged
SSFSKIM merged 4 commits into
mainfrom
smns-maws-ask
Oct 18, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
smns-maws-ask

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Board #76. A session under MAWS asks the human through MAWS's own tool, mcp__maws__ask with blocking: false, and sminos's readers didn't know that shape. Now they do, in both export paths, so such an ask records question and then answered with the same shape the plugin's async ask has, both with src set to the call id.

The shape, read from MAWS's transcripts

  • The call: tool_use mcp__maws__ask, input {title?, context?, blocking: false, questions: [{id?, question, header?, modality, options?: [{label, …}]}]}. question and options[].label are the plugin's field names, so the question event is built the same way.
  • Its acceptance: the tool_result text is JSON, {"status": "asked", "askId": <the call id>}. MAWS sets askId to the engine's tool-use id (src/engine-host/tool-server/ask.ts). A blocking call, or a subagent's call (MAWS treats every subagent ask as blocking), is answered {"status": "answered", …} in its own result and records nothing, as a blocking plugin ask records nothing.
  • The answer: MAWS's steer, a priority: next prompt whose text opens with [MAWS ask <askId>] The user answered the questions you asked:, has one line per question, and ends with the answered AskResult in a json fence (askSteerText / parseAskSteer, src/shared/maws/ask.ts). It is written as a user row when the session was idle. When the engine takes it into a running turn, it is written as a queued_command attachment (commandMode: prompt, origin.kind: human). The answered text is the steer's answer lines (1. Proceed? — Yes), without the tag, the header or the fence.

Fixtures: tests/sminos/maws-ask-async.jsonl comes from MAWS's live-recorded test/fixtures/transcripts/p1-maws-ask-async.jsonl. maws-ask-async-midturn.jsonl puts the same steer into the real queued_command row of w1-steer-next-disk.jsonl. Attachments, thinking, paths and the classifier context are stripped.

Changes

  • sminos.py: _ask_events reads MAWS's call, acceptance and steer beside the plugin's.
    • The question's src is the askId the acceptance names: the call id, or MAWS's request id when the engine named no call (askId = toolUseId ?? requestId), so the question and its steer always correlate.
    • export_host holds its position before an unresolved MAWS call, as it does for the plugin's.
    • The diff stays local to the ask readers.
  • hooks/mods/bridge-rows.tsx: the bridge's live export pairs a non-blocking MAWS call with its result, as it already does for the plugin's async ask.
  • Tests: run-sminos-tests.sh covers the idle steer and the mid-turn steer, chat --host showing the question open and then answered, and the cases that must record nothing (blocking, held, refused, a peer's quote of a steer, a steer whose result names another ask), an ask accepted under MAWS's request id, and a Stop that reads the call before its acceptance. bridge.test.ts covers the MAWS export.

Not fixed here

A session MAWS launches is still not a project member, so this PR changes nothing visible for real MAWS sessions yet. MAWS launches every session with CLAUDE_CODE_ENTRYPOINT=sdk-ts, and joinable never admits an sdk* entrypoint on sight (the M3 ruling against headless runs). As a result such a session records no joined, no message and no question, and the desk has no presence or transcript for it. Admitting it is a membership decision, logged in TECH-DEBT.md. sdk-ts alone can't tell MAWS from other headless runs: this repo's own tests/claude-code runs record sdk-ts too.

Logged as T3: an answer reaches the log only at the next Stop. The bridge exports questions live but not answers, for the plugin's asks and for MAWS's.

Board #76. A session under MAWS asks through mcp__maws__ask with
blocking false. The call's result is {"status":"asked","askId":<call id>}
as JSON, and the answer arrives later as MAWS's steer: the human's prompt,
opening with `[MAWS ask <askId>]` and ending with the answered AskResult in
a json fence. It is a user row when the session was idle, or a
queued_command attachment when the engine took it into a running turn.
_ask_events now reads that call, its acceptance and the steer beside the
plugin's shapes: `question` at the acceptance, `answered` at the steer
(the steer's answer lines), both with src set to the call id. The bridge's
live export pairs a non-blocking MAWS call with its result, as it already
did for the plugin's async ask.

Fixtures come from MAWS's live-recorded transcripts
(p1-maws-ask-async.jsonl; the mid-turn row is w1-steer-next-disk.jsonl's
queued_command carrying the same steer), with attachments, thinking and
per-machine fields stripped.

Not fixed here: a session MAWS launches registers with entrypoint sdk-ts,
and an sdk* entrypoint never joins a project on sight. Such a session is
no member and still records nothing (TECH-DEBT, spec §9).
…st-id askId

A Stop that read a MAWS ask call before its acceptance reached the
transcript moved the export position past the call, so the next export
saw the result without its call and the question was lost. The position
now holds before every call of either ask tool.

MAWS names an ask by the engine's tool-use id, else by its request id
(askId = ctx.toolUseId ?? ctx.requestId), and steers it under the same
id. An acceptance naming a request id was dropped while its steer still
recorded answered; the question now records under the askId the
acceptance names, so the pair correlates.
# Conflicts:
#	.claude-plugin/marketplace.json
#	.claude-plugin/plugin.json
#	.codex-plugin/plugin.json
#	package.json
@SSFSKIM
SSFSKIM merged commit a834c58 into main Oct 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant