Skip to content

P4-R7z: MAWS sessions use the plugin's message tool - #248

Merged
SSFSKIM merged 3 commits into
masterfrom
p4-r7z
Oct 28, 2026
Merged

SSFSKIM merged 3 commits into
masterfrom
p4-r7z

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

P4 Decision Log 92 is the owner's ruling. A MAWS session now messages its human through the to-human plugin's mcp__to-human__message alone. MAWS drops its own mcp__maws__message and its own full to-human contract. No to-human plugin means no to-human lane in MAWS.

Do not land this before to-human 0.7.1 (doperpowers #415) is installed on the MacBook. Before that release, the plugin registers its tool only in interactive sessions, and every MAWS launch is headless (-p). Landing earlier would leave MAWS sessions with no message tool at all.

The launch (X6, X9, X18)

  • Tool server: mcp__maws__message leaves the maws server (src/engine-host/tool-server/message.ts and src/shared/maws/message-tool.ts are deleted). ALWAYS_LOAD moves to the leaf src/shared/maws/always-load.ts.

  • Allowed tools: the launch's --allowedTools is mcp__maws__ask alone. The plugin's tool needs no entry: the plugin answers its own calls, and process-yield test: load the spine with a read that wakes no engine host (the design-system seed flake) #415's live check saw no can_use_tool request for them.

  • When the lane is on: the launch decision turns the lane on only where the plugin registers its tool, which the style resolver reports as messageTool (src/main/owner/resolve-style.ts). All of these must hold:

    • the selected style is the plugin's own, doperpowers:to-human (the plugin keys its tool on that name);
    • the style declares 6 or later;
    • the to-human plugin is installed, enabled and applicable for the session's directory;
    • no setting turns every hook off (disableAllHooks; the launch profile's hooks none sets it);
    • managed settings don't restrict hooks to managed ones (allowManagedHooksOnly).
  • What a lane-on launch carries: it appends supplement 3, which says only what MAWS owns: its ask tool in place of the style's. It no longer carries the message rule or the "not available here" sentence; the plugin's style body carries the message rule. Every other launch has the lane off: nothing appended and no variable set.

  • The advertisement: MAWS_NATIVE_TO_HUMAN is 8, meaning MAWS offers no message tool. It is set only where the lane is on.

  • Gone: P4-R7y's SessionStart alias, and P4-A2's appended copy of it under hooks none.

  • Recorded sessions: a session recorded under contract 1, 5 or 7, supplement 1 or 2, or the alias renders anew at its next launch through the existing recorded-state machinery. Tests cover each case: src/main/owner/launch.test.ts, and decideFlags's table.

  • The lane in effect: when the switch is on but the launch's style carries no lane, the session's lane reads off. This is laneInEffect and styleCarriesNoLane in src/main/owner/mods.ts. It covers:

    • the report view, the session's attention items and its pending state;
    • a decided launch's record, which projects the session's items again, silently;
    • marks written while the lane was off, which never become items.

    Without this, every user without the plugin would get a report view that hides their sessions' unmarked prose, because the to-human switch is on by default.

The readers

  • Message calls: src/shared/owner/message-call.ts names both tools: the plugin's, and MAWS's former one for recorded sessions. Every reader takes an accepted call of either as a to-human message: the summary, the digest, recent turns, the renderer model and the desk.
  • One shared list: the renderer model's host-set messageTools seam (P4-R7x) and the desk's own DESK_MESSAGE_TOOLS both fold into the shared reading.
  • The live normaliser: it skips the plugin's made-up answer after a final message, using the frames process-yield test: load the spine with a read that wakes no engine host (the design-system seed flake) #415 recorded.
    • A response whose message id starts with msg_hook_ streams no partials, since its text is not known to be a reply until it is whole.
    • Its whole frame is skipped by isMadeUpFinalAnswer. That predicate now matches on the flag (disk) or the msg_hook_ id (wire, where the flag is absent), plus the exact text.
    • The turn's resultText is the final message rather than Message sent to the human., so side-thread summaries read the message. A response after the made-up answer (a Stop hook that blocked the stop) takes the result back.
  • PR to-human compatibility: no MAWS reader shows the plugin's made-up answer after a final message #240's tests are flipped: a plugin call now reads as a message in every reader.

Behaviour changes

  • Subagents: a subagent can no longer message the human directly. The plugin refuses a subagent's call, whereas MAWS's tool accepted one.

  • Non-interactive registration: a MAWS session has a message tool only if the installed to-human release registers it in a headless session at MAWS_NATIVE_TO_HUMAN ≥ 8 (0.7.1 does).

  • The launch profile: these settings now leave the lane off:

    • its output style MAWS's, which is the engine's default style;
    • its hooks none;
    • turning the to-human plugin off.

    The Settings › Engine notes say so. Whether to keep the MAWS's style option is the owner's call (tracker row).

  • Hook-made responses: they no longer stream partials. Another plugin's made-up response appears whole when complete.

  • Sessions that ran under P4-R7y's alias: their conversation keeps the alias context. Resumed, the model may call mcp__maws__message once, get the engine's unknown-tool error, and then use the plugin's tool (tracker row).

Choices the ruling left open

  • Which launches carry the lane. I read the plugin's own registration conditions from what MAWS can see: the style name and declaration, plugin enablement, and hook policy. I don't check the to-human release's version; the landing precondition above covers that.
  • The no-plugin case in the UI. The lane reads off when the switch is on but the style carries no lane. This is inferred from the stored launch row (enabled_at set and desired off), so no schema change was needed.
  • The P2-C live run (e2e/to-human-live.spec.ts) reads MAWS's contract 7 and supplement 2. It now skips with that reason until it is rewritten (tracker row).
  • The probe's served snapshot keeps P4-R7's message, because the P4-B4 and P4-A3 fixtures were recorded against it. The unit test pins the source to that snapshot less that one tool (tracker row).

Review

reviewer-high ran two rounds.

  • Round 1 found four problems, all fixed in 25d8884:
    1. The lane was keyed on the style's declaration rather than on the plugin's registration conditions.
    2. Attention items were not projected again when a launch moved the lane.
    3. Marks written with no lane could become items later.
    4. The result text was lost when a turn continued after the made-up answer.
  • Round 2 found one remaining edge, the managed-only hooks policy, fixed in feeee75.

Gates

  • Head feeee75: run 40619937490, success on attempt 1. This was class 1a (--gates static,unit,probes --class1a pool) plus e2e:to-human on the mini (--runner macos).
  • 25d8884: run 40618750775, success. This was class 1a plus the owner-channel e2e groups e2e:to-human, e2e:widgets, e2e:available, e2e:side and e2e:transcript on the mini, and e2e:desk-web. feeee75 changes only the resolver, adding the managed-hooks condition and its test.
  • The first head, 7f7bd45: run 40616636066. Every e2e group passed. One unit test still listed the removed tool (session-maws.test.ts); 25d8884 fixes it.

Tracker: the row for MAWS's tool having no final is closed by this change. Five rows are added: the live run, the probe snapshot, the profile's MAWS's style, the alias in old conversations, and the mods row's Off without a reason.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

P4 Decision Log 92 (the owner's ruling): a MAWS session messages its human through the to-human plugin's mcp__to-human__message alone. mcp__maws__message leaves the maws server and the launch's allowed tools (the plugin answers its own calls; the engine asks nothing). MAWS's full contract goes: the launch decision turns the lane on only for a style declaring the plugin's message tool (6 and up, carriesPluginMessageTool), with supplement 3 beside it (MAWS's ask tool alone), and off for any other style or none. MAWS_NATIVE_TO_HUMAN advertises 8, MAWS offering no message tool. P4-R7y's SessionStart alias and P4-A2's appended copy go. Sessions recorded under contract 1, 5 or 7, supplement 1 or 2, or the alias render anew through the recorded-state machinery. A switch-on launch whose style carries no lane leaves the session's lane off for its presentation and items (laneInEffect).

Every reader takes an accepted call of the plugin's tool as a to-human message, and MAWS's former tool's in recorded sessions (message-call.ts, both names); the renderer model's host-set messageTools and the desk's own list fold into that reading. The live normaliser skips the plugin's made-up answer after a final message: no partials of a msg_hook_ response, the whole frame by isMadeUpFinalAnswer (the flag on disk, the msg_hook_ id on the wire, and the exact text), and the turn's reply is the final message rather than the made-up text (side-thread summaries read it). PR #240's tests flip: a plugin call now reads as a message in every reader.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
The review of 7f7bd45 found four things, fixed here. (1) A declared contract of 6 does not register the tool: the to-human plugin registers mcp__to-human__message only under its own style, doperpowers:to-human, and only while its hooks load. The resolver now reports messageTool: that style, declaring 6 or later, the to-human plugin installed, enabled and applicable, and no setting turning every hook off (the launch profile's plugin off and hooks none both leave the lane off). (2) A decided launch's record now projects the session's items again, silently (laneChanged), so a launch whose style carries no lane takes them away at once. (3) A mark written while the style carried no lane is never an item, though the watermark stands. (4) A response after the made-up answer (a Stop hook that blocked the stop) clears the final message's claim on the turn's result. Also: session-maws's tool list (CI's unit 1/4 at 7f7bd45), a shared test helper that installs the plugin's style and the to-human plugin, the e2e scratch homes on it, and the hooks note in Settings.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…view round 2)

The second review round found one edge of the registration check: managed settings' allowManagedHooksOnly keeps a user-installed to-human plugin's hooks from loading, so its tool is not registered. The resolver reads the key from the managed settings file, where the engine honours it, and reports no message tool under it.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T02:24:17.132667Z feeee75 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 5c6aab3 into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…n's message tool; its ledger and the interface ledger's X6, X9, X18

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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