Skip to content

Surface workflow step logs in terminal output #16

Description

@pmateusz

Why

Some workflows need to report intermediate results, decisions, warnings, or produced values while they run. Today the supported step logger writes step-log events to the run log, but those events are ignored by the live tree, headless progress output, summaries, and /workflow status. From the user's perspective, the output is lost unless the workflow writes a separate file.

What

Make messages written through a step's logger.info, logger.warn, and logger.error APIs visible during execution and retrievable afterward.

Description

The event log should remain the source of truth. Rendering should subscribe to persisted step-log events and present them on an output surface appropriate to the current mode. Interactive mode may use a dedicated log area or transcript entries rather than adding arbitrary text to the compact progress tree. Headless json and print modes must write human-facing log lines to stderr because stdout is reserved for their machine-readable/answer contracts.

Direct console.log calls should not become the workflow logging API: they cannot be attributed reliably and can corrupt stdout protocols. The documented path should be the injected structured logger, including its level, step path, message, and optional data.

Acceptance criteria

  • logger.info, logger.warn, and logger.error messages become visible during a run.
  • Each rendered message identifies its workflow step or node path and preserves its severity.
  • Optional structured data has a readable, bounded representation and remains intact in the stored event.
  • Interactive output does not disrupt or permanently overwrite the progress view.
  • Headless json and print modes emit step logs to stderr only; stdout remains unchanged.
  • Historical step logs can be retrieved through /workflow status or another documented run-inspection command.
  • Replaying or resuming a run does not print old log entries again as if they were new.
  • Concurrent step logs remain attributable even when their arrival order is interleaved.
  • Tests cover all severity levels, structured data, headless channel separation, and resume behavior.

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions