Skip to content

Define shared operator turn/task state protocol for TUI and webchat #3581

@njfio

Description

@njfio

Problem statement

Tau does not have a first-class shared operator turn/task state model. The runtime emits low-level provider and tool activity, while the TUI and webchat each reconstruct their own view from logs, ad hoc events, and endpoint-specific payloads. This causes missing assistant output, weak progress feedback, divergent behavior between TUI and webchat, and poor recoverability when turns fail or time out.

Acceptance criteria

  1. Shared state contract defined
  • Define a typed operator state/event contract for: turn, task, tool, approval, artifact, memory, cortex, job, and error.
  • The contract must support both live streaming updates and snapshot/state-sync reads.
  1. Runtime semantics defined
  • Define how provider start/progress/partial-output/tool-execution/approval/timeout/cancel/failure states map into the shared contract.
  • Failures must preserve actionable phase context instead of collapsing into opaque timeout text.
  1. Client consumption rules defined
  • Specify how TUI and webchat consume the same contract for transcript, progress, tools, tasks, memory, and artifacts.
  • Eliminate log-parsing as the primary UI integration path for operator-visible state.
  1. Backwards-compatibility boundaries defined
  • Identify what legacy stderr/stdout markers and gateway endpoints remain temporarily supported during migration.
  • Define cutover rules so old and new paths do not silently diverge.
  1. Test plan defined
  • Add acceptance criteria for runtime integration tests, TUI parser/render tests, and web/browser tests that prove both clients render the same turn/task outcomes.

Non-goals

  • Full visual redesign in this issue.
  • Provider-specific prompt redesign by itself.
  • Swarm orchestration design beyond the state primitives it depends on.

Notes

  • This issue is the dependency for the TUI and webchat redesign tracks.
  • Existing related issues on TUI resilience, memory parity, and tool reliability should build on this contract rather than invent separate UI-specific state paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions