Repository navigation
Error attention: raised only if unseen; an API error reads as itself - #376
Merged
Merged
Conversation
…mark, retired for good once seen or dismissed; an API error reads as itself (the engine's words in Needs you, the transcript row where it happened, the divider the turn's work, the digest idle); the 'ended with an error' glyph and kept notice withdrawn; charter Decision Log 2026-10-30 Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…g (every index change of the record reaches it) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…liser reads the wire's snake-case is_api_error_message as well as the transcript's isApiErrorMessage; pass2/auto-unrouted's envelopes now draw api error rows, snapshot updated); an error seen as it arrives leaves a durable mark (IndexSessionSource.seenNow replaces isVisible and writes the record's last-seen mark through the unread rule, so a replay after the reader left, or after a restart, raises nothing); an open item stored in the old generic words takes the derived words when the transcript replays it (state and moments kept, a retired one left alone) 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 30, 2026
…ion Log 155: B4 step 0's O8 and Q10 questions answered Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 30, 2026
…-load; the window's fields take WIRE_MINOR 9 beside #374's resume Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 30, 2026
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 owner's ruling (2026-10-30), verbatim: "Only if unseen: raise the error item only when the error is newer than the last time you saw that session in MAWS. An old session's error you already saw stays quiet; a session that failed while you weren't looking still tells you once. also the error should just show how session shows -- like if there's API error, then display that API error happened, not make the whole session end with error."
The bug
Opening an old session whose last turn ended in an API error weeks ago showed "! Error · The turn ended with an error · 3 weeks ago · Dismiss" in the composer and a Needs-you item. The engine host's disk backfill writes
turn.ended { isError: true }after anisApiErrorMessagerecord, and the attention service raised anerroritem from every such event, read from disk or not. Once seen, E11 F2b kept the item as the session's "ended with an error" fact: the notice stayed in the composer and the session glyph read "✕ Ended with an error ".What "seen" means, as built
Seen = the session's last-seen mark, C4's unread rule (
SessionRecord.lastSeen.atin the index, undersrc/services/index/):session.setVisible→IndexSessionSource.onSetVisible.IndexSessionSource.seenNow). That makes "seen as it arrived" durable after the reader leaves.How the attention service uses it:
erroritem (a failed turn or a failed background task) is raised only when itscreatedAtis later than the mark. A session MAWS never showed has no mark, so its error tells once.confirmedis no longer used for errors. A confirmed error from an earlier build loads as retired. A pending one loads as retired if the session has been seen since.startSpine: main on the embedded shape,mawsdon the daemon shape.One consequence: a glance now counts as seen, the same as for the unread dot. Opening the session retires its error at once; it no longer waits for the 2 s dwell.
An API error reads as itself
terminal_reason: 'api_error'. For example: "API Error: 529 Overloaded. This is a server-side issue, usually temporary — try again in a moment." An open item stored with the old generic words takes the real ones when its transcript replays.is_api_error_message(snake case), and the normaliser read only the transcript'sisApiErrorMessage. Live API errors were therefore drawn as ordinary assistant text. The snapshotpass2/auto-unrouted.rows.jsonis updated to match.terminal_reason: 'api_error'leaves the digest idle instead of failed. The "Ended with an error" glyph is withdrawn, and so is the composer notice kept after the error was seen.The charter's Decision Log records the amendment of §5.7 and of the 2026-10-08 E11 line (2026-10-30 entry).
Wire and schema
There are no schema changes: no IPC, event or record field was added or changed.
is_api_error_message. The X1 event field it fills already existed.AttentionServicegainsseen(appSessionId, at)and an optionalseenAtdep.IndexSessionSourcegainsseenNow.attention.acknowledgekeeps its schema;howno longer changes the outcome.Tests
IndexandIndexSessionSource:api_errorresult reads idle.pass2/auto-unroutedenvelope.transcript-d1-api-error-after-work.jsonl, a backfilled API error after tool work).e2e/supervisor.spec.tsreworked for the new rule:Review: one doperpowers:reviewer-medium round found three issues. All three were real and are fixed in 4dae018: the live flag spelling, a durable seen mark for an error seen as it arrived, and refreshing the stored generic words.
Gates on 4dae018: class 1a (static, unit, probes) and e2e supervisor, supervisor-daemon, c7, transcript all green, run https://github.com/SSFSKIM/MAWS/actions/runs/41132612927 (macOS e2e lane, class 1a on the pool). Earlier: class 1a on 2bae9ff green (run 41130713207); the first class 1a on 66ba554 (run 41129471059) went red only on an unrelated daemon.test.ts lock race.
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)