Repository navigation
to-human compatibility: no MAWS reader shows the plugin's made-up answer after a final message - #240
Merged
Merged
Conversation
…wer after a final message to-human 0.7.0 (doperpowers #411) ends a turn on a final message without a request: the plugin answers the engine's next step itself, and a terminal session's transcript keeps that answer as the turn's last assistant record (one text block, 'Message sent to the human.', answeredWithoutRequest: true, no requestId, a msg_hook_ id). isMadeUpFinalAnswer (src/shared/owner/message-call.ts) knows it by the flag and the exact text, as the plugin's view does. The backfill maps it to no event, so the chain follower, the renderer's transcript model, the digest, the recent turns, the replay runner and the desk never meet it; the summary's last line and the search text's worker pass over it. The record stays on the chain. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…se; the predicate test typechecks; a tracker row for cached summaries The review of a99fb03 found the desk's off-chain reading (apps/desk-web/src/depth/source/off-chain.ts, isResponse) taking the plugin's made-up answer as a response that read the inputs before it, so a delivery appended beside a final call and left off the chain was hidden rather than drawn as not read. isResponse now passes over it, as it passes over the engine's <synthetic> rows. The predicate test's record literal is typed so tsc's excess-property check (run 40609514538's static failure) passes. Main's index cache of a summary and search text read before the skip is logged as a tracker row: no local transcript holds the record yet. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
…r hidden); the plugin must also register its tool in MAWS's non-interactive launches Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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.
The record
to-human 0.7.0 (doperpowers PR #411, not merged yet) adds
final: trueto the plugin's message tool. After a final message, the plugin answers the engine's next step itself, with no API request. A terminal session's transcript JSONL then ends that turn with a made-up assistant record:Message sent to the human.answeredWithoutRequest: truerequestIdmsg_hook_The plugin's own view draws that record as nothing. MAWS reads terminal sessions' transcripts, so without this change it would show the record as a reply, count it, and take it as the session's latest line.
The change
isMadeUpFinalAnswer(src/shared/owner/message-call.ts) recognises the record the same way the plugin's view does when it reads the file: theansweredWithoutRequestflag plus the exact text. A model that writes the same sentence, and another hook's made-up answer, are still shown. The flag alone would also match the engine's other unrequested rows (2.1.311 sets it on every assistant item of a step answered without a request, including its patched tool-call rows). Themsg_hook_fallback isn't needed: the plugin pins the flag on disk in its live check and reads it on resume.Readers that skip it:
src/engine-host/fs/backfill.ts,assistantEvents). The record produces no events, like the engine'sNo response requested.marker. It still resets the tool-loop and API-error state, so the turn ends as before. This one change covers every reader that works from events: the chain follower (and through it the renderer's transcript model, the transcript store and main's digest), main's recent turns, the replay runner, and the desk's transcript, which maps rows through this backfill. The record stays on the chain as a record, so resume and rewind points don't move.src/engine-host/fs/summarize.ts,lastAssistantLine). This feeds the index'slastAssistantText. It walks the tail newest first and passes over the record.src/engine-host/fs/search-text.ts). Its worker embeds the predicate's source and doesn't index the record's words. The predicate is written to reference nothing outside its own body. The transpiled source was checked to be self-contained, and the review exercised the worker in a Rollup bundle.apps/desk-web/src/depth/source/off-chain.ts,isResponse). It no longer counts the record as a response that read the inputs before it. This was found in review: a delivery appended beside a final call and left off the chain was hidden instead of drawn as not read.Readers left alone:
-plaunches raisesession.startwithisInteractive: false(cli.pretty.js,Noo({ … surface: null, isInteractive: !1 })). So the record can't come over MAWS's wire today.landed-message.ts,asked.ts,desk-transcript.ts'smodelOf). The record has no marks and no tool calls, so it matches none of their lookups. Its model is the session's own.src/main/owner/projection.ts). It sees events only, and the record now produces none.Logged instead of fixed: main's index caches a transcript's summary and search text until the file changes. A transcript that gained the record while its machine ran a MAWS without this change keeps the old line until the session writes again. None exists yet: a search of the MacBook's
~/.claude/projectsfound no"answeredWithoutRequest":true, and 0.7.0 is unreleased. The tracker row closes once every machine runs this change before 0.7.0 is installed there.Tests
The fixture is
test/fixtures/transcript-to-human-final.jsonl. It holds one turn: a prompt, a text and aBashcall in one response, then an accepted finalmcp__to-human__messagecall, then the made-up record with the exact shape above, thenturn_duration.Each reader's test shows the record is gone from its output. Each also shows how the call before it reads:
mcp__maws__messagereads the call's message as the latest line.to_humanrow, the turn's last row.Mutation checks:
drawingOfcheck of the same rows. The desk suite's own case runs only on CI; the local install lacks one of its modules.Gates
Class 1a (
--gates static,unit,probes --class1a pool) on head 18905dd, tree 0bb062877: run 40610858419, success on attempt 2.org-directory.test.ts:403("is given up after 8 sends": expected 8 calls, received 10). That's the known shared-LocalHub counting flake. This branch changes nothing in desk-hub, and the same shard passed on the first head.gh run rerun --failed, every job passed.src/shared/owner/contract.ts(supplement 2) and MAWS's ownmcp__maws__messageare untouched.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)