fix(inbox): sub-session notification wording reflects reported task status, not just actor lifecycle#1711
Merged
Merged
Conversation
…tatus, not just actor lifecycle Two defects in renderActorNotification/parseActorNotification: 1. Semantic: "actor completed" described the sub-session *process lifecycle* ending, which is independent of the task outcome. A sub-session can exit cleanly while its reportedStatus is failed/blocked, yet the old text always said "completed. Status: unknown", implying success. Completion wording now aligns with reportedStatus: success/partial → "completed"; failed/blocked → "finished (status: ...)" (no success implication); unknown → neutral "ended (status not reported)" with the misleading "Status: unknown" line dropped. 2. Terminology: "actor" is an internal term. Top-level wording and the TUI card now say "sub-session" to match the orchestrator context. parseActorNotification (inverse) and its header regex are updated to parse the new verbs so the #1699 TUI card keeps parsing, adding an "ended" status. Round-trip render->parse is covered by tests.
… regex Finding 1 (UX consistency): actor.ts start notification now says 'Background sub-session started.' instead of 'Background actor started.' to match the finish notification format. Finding 3 (backward compat): parseActorNotification regex now accepts both 'Background sub-session' and legacy 'Background actor' formats so old persisted notifications render as TUI cards instead of raw text. Includes regression test for legacy 'Background actor' format.
…arted' wording The actor notification text was changed in actor.ts:770 but the corresponding test assertion was not updated to match.
wqymi
added a commit
that referenced
this pull request
Jul 14, 2026
… regex Finding 1 (UX consistency): actor.ts start notification now says 'Background sub-session started.' instead of 'Background actor started.' to match the finish notification format. Finding 3 (backward compat): parseActorNotification regex now accepts both 'Background sub-session' and legacy 'Background actor' formats so old persisted notifications render as TUI cards instead of raw text. Includes regression test for legacy 'Background actor' format.
wqymi
added a commit
that referenced
this pull request
Jul 14, 2026
fix(inbox): sub-session notification wording reflects reported task status, not just actor lifecycle
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.
Summary
renderActorNotification/parseActorNotificationinpackages/opencode/src/inbox/render.tshad two defects in the sub-session completion notification.Defect 1 — semantic: "completed" conflated process lifecycle with task outcome
event.status === "completed"only means the sub-session process ended cleanly. That is independent ofreportedStatus(the task outcome the sub-session self-reports via**Status**: ...). A sub-session can exit cleanly while its taskreportedStatusisfailed/partial/blocked, yet the old text always rendered... completed.\nStatus: unknown, misleading the user into thinking the task succeeded.Now the completion verb aligns with
reportedStatus:success/partial/ (absent) → completed (affirmative; aStatus:line is shown only when a status was reported)failed/blocked→ finished (status: ...) — states the outcome, never implies successunknown(ran but didn't report in**Status**:format) → neutral ended (status not reported), and the misleadingStatus: unknownline is dropped entirelyDefect 2 — terminology: "actor" is an internal term
The top-level wording is changed from
Background actor→Background sub-session, matching the orchestrator's sub-session context. The TUI card label (routes/session/index.tsx) likewise changesactor→sub-session.Round-trip safety (#1699)
parseActorNotificationis the inverse of the renderer and feeds the #1699 TUI card. The header regex is updated to recognize the new verbs (completed|finished|ended|failed|was cancelled|stalled) and a new neutralendedstatus is added toParsedActorNotification(styled with a muted card).render → parseround-trip is verified by tests across every branch (success/partial/failed/blocked/unknown/completed/cancelled/stalled).Verification
bun typecheck→ EXIT 0bun test test/inbox/parse-actor-notification.test.ts→ 13 pass / 0 failFiles changed
packages/opencode/src/inbox/render.ts— render verbs + parse regex/statuspackages/opencode/src/cli/cmd/tui/routes/session/index.tsx— cardendedstatus + "sub-session" labelpackages/opencode/test/inbox/parse-actor-notification.test.ts— round-trip coverage for new branches