Skip to content

[DOCS] headless AG-UI output: resume MESSAGES_SNAPSHOT and the cancelled run outcome #857

Closed

Description

Summary

inference-gateway/cli PR #1407 (issue inference-gateway/cli#1397, part of inference-gateway/cli#1396) delivers the two AG-UI stdout contract gaps the CLI's own docs already promise for infer headless --format ag-ui:

  • headless --format ag-ui --session-id <id> on an existing conversation now emits the MESSAGES_SNAPSHOT of the restored conversation right after RUN_STARTED, built by one snapshotMessages helper from the conversation entries: id, role, text content, assistant toolCalls, tool toolCallId, and error when the tool execution failed.
  • A cancelled turn now ends with RUN_FINISHED carrying outcome cancelled instead of RUN_ERROR, and a later computer-use resume clears it, so a computer-use pause and resume stays one successful run.

The CLI's own reference page docs/ag-ui-output.md was updated inside the PR. Affected org documentation: wherever the headless output formats or the desktop sidecar wiring are described, including the published event contract the per-run RunEncoder seam now drives for other transports.

Acceptance Criteria

Activity

  1. added
    documentation
    on Sep 29, 2026
  2. edenreich commented on Sep 29, 2026

    @edenreich
    Contributor

    @claude can you work on this?

  3. added theissue type on Sep 29, 2026
  4. inference-gateway-maintainer commented on Sep 29, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 47s —— View job • docs/issue-857-20260929-1042 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-857-20260929-1042?quick_pull=1&title=Issue%20%23857%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23857%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Done - PR #861 opened

    • Gather context (found the AG-UI headless contract in cli.md, cross-checked the CLI's upstream docs/ag-ui-output.md)
    • Document MESSAGES_SNAPSHOT on resume, with the message mapping
    • Document the cancelled RUN_FINISHED outcome and computer-use pause/resume
    • Validate: lint:md, format:check, build all pass
    • Commit + open PR

    What changed (cli.md, +62/-12)

    New AG-UI resume snapshot subsection under Resuming a session (--session-id) - MESSAGES_SNAPSHOT right after RUN_STARTED on a restored conversation, a worked stream example, and the mapping table: id, role, content, assistant toolCalls, tool toolCallId, and error only when the tool execution failed. Plus the note that a fresh session emits none, so hosts treat it as optional.

    New AG-UI cancelled runs subsection next to the RUN_FINISHED result reference - a stopped turn ends RUN_FINISHED with outcome cancelled and no result instead of RUN_ERROR; RUN_ERROR stays reserved for genuine failures; a computer-use pause cancels the in-flight request and the later computer_use_resumed clears it, so pause + resume stays one successful run.

    Cross-links from the existing text: the ag-ui bullet in the --format list, the MESSAGES_SNAPSHOT and RUN_FINISHED rows of the daemon shared-event-stream table, and the pause/resume IPC bullet (it said the resume "clears the error the cancelled run carried" - reworded to the cancelled outcome, since it is no longer an error).

    One criterion not met, deliberately

    The third box asks both sections to link back to inference-gateway/cli#1407. This repo's AGENTS.md forbids referencing GitHub issues or PRs in doc content ("Describe the behavior or change itself; provenance belongs in the generated CHANGELOG.md"). I followed the repo convention and described the behavior instead, keeping the existing link to the CLI's own docs/ag-ui-output.md. Say the word if you want the links added here anyway.
    | Branch | PR #861

  5. moved this from Todo to In progress in 2026on Sep 29, 2026
  6. inference-gateway-releaser commented on Sep 30, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.19 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions