Repository navigation
Description
Tracked in #568. This proposal stands on its own and doesn't depend on the others tracked there.
Summary
Run history shows when a run happened and whether it succeeded, but not what it did. People want to see "opened pull request 123", "commented on 4 issues", or "nothing to do" without opening a transcript. They also want to clear a failed run's badge once they've looked at it, on every device.
This proposal adds an optional result (summary, outcome, and outputs) to a run's terminal lifecycle, and read state for runs that works like the read state for sessions and chats.
Scenarios
- Run history at a glance. "Opened pull request 123." "Commented on 4 issues." "Nothing to do."
- Changed or not. Clients separate runs that changed something from runs that found no work, for example by dimming no-op runs.
- Needs attention. The agent finished but flagged something a person has to look at.
- Downstream use. Dashboards and other tools consume what each run produced.
- Clearing badges. Failed runs drive an attention badge. After reviewing a failure on one device, the badge clears on all of them, and history isn't deleted.
AHP today
- The
completedlifecycle carries onlyusage, thefailedlifecycle carrieserror, and thecancelledlifecycle carries timestamps. - What a run produced exists only inside its linked sessions' transcripts. Hosts publish session-level references to pull requests and similar items through private
_metaconventions. RFC RFC: Session artifacts #507 proposes typed session artifacts for that. - Sessions and chats have read state (
SessionStatus.IsRead,session/isReadChanged,chat/isReadChanged). Runs don't, and a run that fails before creating a session has nothing that can be marked read.
Proposal
- Result. The
completed,failed, andcancelledlifecycles gain optionalresult: { summary?, outcome?, outputs? }. A run that failed or was cancelled can still have produced outputs, such as a draft pull request.AutomationRunSummary.lifecyclealready mirrors the run's full lifecycle, so results appear in catalogue run history without any extra fields. - Outcome.
outcomeis@nonexhaustive:changed,noChange, orneedsAttention. - Outputs. Outputs are resource references, each with a
labeland an optionaldisplayKindhint such aspullRequest,issue, orcomment. This is the vocabulary attachments already use (ContentRef,label,displayKind). Hosts keep the list short and may summarize. - The host writes results. Agents often report results through a host-provided tool, but that's a host detail. An output an agent reports is a claim, not proof. Hosts SHOULD verify outputs they can check (for example, that the pull request exists) and MAY drop outputs they can't verify.
- Read state. Runs and their summaries gain
isRead, and clients can dispatchautomationRun/isReadChanged { isRead }, mirroringsession/isReadChangedandchat/isReadChanged. The host setsisReadtofalsewhen the run reaches a terminal lifecycle, and again if its result changes after that, so viewing a run while it's still running never hides a later failure. Clients set it totruewhen a user views the run. A run's read state is independent of the read state of its sessions and chats. Clients decide what drives a badge, such as unread failed runs or unread runs that need attention.
Sketch
Names and shapes are illustrative. The implementation PR settles them.
interface AutomationRunResult {
/** One line, human-readable, for example "Opened pull request 123". */
summary?: string;
outcome?: AutomationRunOutcome;
outputs?: AutomationRunOutput[];
}
/** @nonexhaustive */
const enum AutomationRunOutcome {
Changed = 'changed',
NoChange = 'noChange',
NeedsAttention = 'needsAttention',
}
/** A resource the run created or changed. */
interface AutomationRunOutput extends ContentRef {
label: string;
/** Advisory display hint, as on MessageAttachmentBase.displayKind. */
displayKind?: string;
}
interface AutomationCompletedRunLifecycle {
// ...existing fields
result?: AutomationRunResult;
}
interface AutomationFailedRunLifecycle {
// ...existing fields
result?: AutomationRunResult;
}
interface AutomationCancelledRunLifecycle {
// ...existing fields
result?: AutomationRunResult;
}
interface AutomationRunState {
// ...existing fields
isRead?: boolean;
}
interface AutomationRunSummary {
// ...existing fields
isRead?: boolean;
}
/** @clientDispatchable, on the run's ahp-automation-run: channel */
interface AutomationRunIsReadChangedAction {
type: 'automationRun/isReadChanged';
isRead: boolean;
}Why this shape
- Results belong to the run. A session can serve more than one run, so session-level references can't say which run produced what. The run already owns task-level lifecycle and provenance.
- Inside the terminal lifecycle. What a run did sits next to how it ended, and it appears in run history automatically because summaries mirror the lifecycle.
- Existing vocabulary. Outputs use the same resource-reference and display-hint fields as attachments. Read state copies the session and chat pattern exactly.
- Claims, not proof. Saying who may assert an output, and that hosts verify where they can, keeps run history trustworthy without defining agent tools.
Relationship to RFC #507 (session artifacts)
The two are complementary. #507 describes what a session is about and has produced over its lifetime. A run result describes what one run produced. Their shapes should match. If #507 lands first, run outputs can reuse its resource-artifact type, and hosts can derive a run's outputs from the artifacts its turns created.
Compatibility
- Additive and optional state. No capability is needed to read results.
- Clients dispatch
automationRun/isReadChangedonly on runs whose state includesisRead, which tells them the host tracks read state.
Out of scope
- The agent-facing tool for reporting results.
- Protocols for verifying outputs.
- Chaining automations from another automation's outputs. That's a host-defined event trigger.
Open questions
- Should runs with outcome
noChangestart as read? - On hosts with many users, should read state be per user rather than shared, as it is for sessions and chats today?
- Should verified outputs be marked explicitly?
- Should the run summary carry only
summaryandoutcome, and leaveoutputsto the run channel to keep the catalogue small?
Related proposals (none required)
- Definition revisions (Proposal: Automation definition revisions and run pinning #571): together with a run's pinned revision, results answer "which definition produced this output?"
- Continue an existing session (Proposal: Let automation runs continue an existing session #572): results matter most when a long-lived session serves many runs and a session's transcript can't show which run did what.
Activity
benvillalobos commentedon Nov 16, 2026
I'd like to prioritize this as there is a need for exposing the result of an automation to users and is frequently requested. Some thoughts:
I've been seeing this as either "Needs attention" or "can be ignored", would a client display anything meaningfully different between 'changed' and 'noChange', or should this be derived by the
summary?I wonder how much of this should be on the host vs. the client to reason about. I'm not sure if this is crossing some kind of "how much work should be offloaded to the host" boundary, but my gut response to seeing that is that clients would still need to validate what they are displaying cc Connor Peet (@connor4312)
benvillalobos commentedon Nov 17, 2026
I could see a use case for adding
SuccesstoAutomationRunOutcome.I'm still not fully convinced on the difference between "did something" (
changed) and "did not do something" (nochange), but "completed the intended task successfully" vs. "there was nothing to do" seems like a meaningful distiction I would want in vs code (eg.kick the tires on flaky CI in any PR's I have open right now, ortriage new issues that were assigned to me).Perhaps
changedmeanssuccessin this scenario, and anychangedoutcome is technically a success, but would love other perspectives hereconnor4312 commentedon Nov 17, 2026
I'm okay with the general direction, though as Ben says I'm very suspicious of the shape of
AutomationRunOutcome. I have automations that process GitHub notifications. These can interact with the notifications, but should that be expressed as them making a change or not? And as a user how does that matter for my experience?