Transcript and Display Reference¶
Ralph Workflow is a free and open-source AI agent orchestrator built around a simple core loop inspired by the original Ralph loop. That simple core composes into a stronger workflow system for serious repo work, and the default workflow is already strong enough to start with before you customize anything.
This page explains the terminal transcript Ralph Workflow prints during a run. It is mainly for contributors and operators who want to decode the exact line format, display rules, and lifecycle banners.
If you just need to run Ralph Workflow successfully, you can skip this page and use Getting Started, CLI Reference, and Troubleshooting instead.
Ralph Workflow emits a structured, line-oriented transcript to stdout. Every line has a fixed format that can be machine-parsed or read directly in a terminal.
Display Architecture¶
DisplayContext (from ralph.display) is the single place where Ralph Workflow decides how output should render: console, theme, terminal width, color policy, display mode, and adaptive character limits.
Dependency Injection Contract¶
Every renderer function requires a display_context: DisplayContext argument. No renderer should construct its own rich.Console. Callers create a DisplayContext with make_display_context() before invoking any renderer.
from ralph.display import make_display_context
ctx = make_display_context() # uses terminal width, NO_COLOR, etc.
show_phase_start("planning", display_context=ctx)
Width and Mode Precedence¶
Priority |
Source |
Effect |
|---|---|---|
1 |
|
Forces |
2 |
|
Overrides all width detection |
3 |
|
Overrides console.width |
4 |
|
Default fallback |
Mode Thresholds¶
Mode |
Width |
Description |
|---|---|---|
|
< 60 cols |
Suppresses secondary columns, extra blank lines, descriptive rules |
|
60–99 cols |
Standard layout with moderate condensing |
|
≥ 100 cols |
Full multi-line layout with all sections |
Color Precedence¶
Priority |
Env var |
Effect |
|---|---|---|
1 |
|
Disables all ANSI color output |
2 |
|
Forces ANSI color on (even when not a TTY) |
NO_COLOR takes precedence over FORCE_COLOR per standard CLI conventions.
Width Refresh (cross-platform)¶
A width refresher is installed at pipeline start via install_width_refresher(). When
the terminal is resized:
The refresher calls
DisplayContext.refreshed()which re-reads the current terminal width and recomputes mode and adaptive limits.Renderers that buffer adaptive limits (e.g.,
PlainLogRenderer) refresh their context at phase boundaries viaflush_blocks().The runner keeps its live display object and nested plain renderer synced with the refreshed context, so later banners and summaries render with the new mode.
On POSIX systems (Linux, macOS) when called from the main thread, the refresher installs
a SIGWINCH signal handler. On Windows, or when called from a non-main thread, a
background poll thread monitors width changes instead. The returned stop callback is
invoked at pipeline shutdown to clean up the poll thread when one was started.
Line Format¶
<ISO-TS> <LEVEL> <CAT> [<tag>][<unit>] <content>
Field |
Example |
Notes |
|---|---|---|
|
|
ISO-8601 timestamp |
|
|
One of the five levels below |
|
|
|
|
|
Sub-operation tag (see table below) |
|
|
Work unit ID in parallel runs; omitted otherwise |
|
|
Human-readable message |
Levels¶
Level |
Meaning |
|---|---|
|
Routine update or progress |
|
Phase or pipeline completed successfully |
|
Non-fatal issue or degraded state |
|
Fatal error or malformed input |
|
Major phase transition (planning, development, commit) |
Verbosity controls which levels are shown. Use --quiet to suppress everything except
ERROR, or --debug to show all levels.
Categories¶
Category |
Meaning |
|---|---|
|
Workflow metadata: phase transitions, plans, activity, worker events, run summary |
|
Agent-produced content: text, thinking blocks, tool calls, tool results, errors |
Streaming Blocks and Long-Content Display¶
Long agent outputs (for example code, plans, or long prose) are emitted as streaming blocks bounded by content-start / content-end tags. Within a block:
content-continuelines carry the raw streamed chunks.content-checkpointlines appear at configurable intervals to allow progressive display without buffering the entire block.
Ralph Workflow also applies a deterministic headline summary layer when a completed block exceeds 4000 display cells. That layer is enabled by default. It appears before the condensed output so operators get a stable summary instead of scrolling through a giant block.
If no clean headline can be extracted, Ralph Workflow shows (no headline available). Inline summary lines are capped at 200 characters, and streaming end-line summaries are capped at 120 characters.
Disable the deterministic headline layer with RALPH_LONG_CONTENT_SUMMARY values 0, false, no, or off. There is no special opt-in value because the feature is already on by default.
When a block ends, Ralph Workflow may append summary lines depending on configuration:
⇳ summary:— static truncation summary (always present for very long blocks)⇳ preview:— first N characters of the block content⇳ ai-summary:— LLM-generated one-line summary (requiresRALPH_LONG_CONTENT_AI_SUMMARY)
The optional AI-generated layer is separate from the deterministic headline layer. Use RALPH_LONG_CONTENT_AI_SUMMARY only when you want the additional ↳ ai-summary: style output.
[phase-close] Line¶
At every phase transition, a single [phase-close] line is appended to the transcript:
<ISO-TS> INFO META [phase-close] <glyph?> phase=<name> [Dev N/cap]? [Analysis N/cap]? <produced> exit=<trigger> (elapsed=Ns, content_blocks=N, thinking_blocks=N, tool_calls=N, errors=N)
Field |
Notes |
|---|---|
|
Milestone glyph ( |
|
Name of the phase that just ended |
|
Canonical iteration labels — only present when in a context that tracks them |
|
Human-readable artifact summary (e.g. |
|
Why the phase ended — omitted when the exit trigger is unknown |
Counter tuple |
Phase-level activity metrics always present |
The exit=<trigger> values for phase-close lines:
Value |
Meaning |
|---|---|
|
Phase completed by producing its expected artifact |
|
Phase ended without producing a tracked artifact (e.g. a pass-through or skipped phase) |
Canonical iteration labels¶
All display surfaces (phase-start banners, [phase-close] lines, completion panel) use
the same vocabulary for iteration context:
Label |
Meaning |
Color |
|---|---|---|
|
Outer development cycle (1-indexed); shows cap when the progress cap is known |
Bold sky-blue |
|
Inner analysis loop iteration; shows cap when known |
Purple |
[run-end] Panel¶
At the end of every pipeline run, a [run-end] block reports the run summary.
The format adapts to the display mode:
Compact mode (< 60 cols): abbreviated 3-line summary:
<ISO-TS> MILESTONE META [run-end] <phase> | <elapsed>s | <exit_trigger>
<ISO-TS> INFO META [run-end] agent=N content=X thinking=Y tools=Z errors=W
<ISO-TS> INFO META [run-end] pr=<url>
Wide mode (>= 100 cols): multi-line with grouped counters and PR at end:
<ISO-TS> MILESTONE META [run-end] ◆ Ralph Workflow run end
<ISO-TS> INFO META [run-end] phase=<phase> elapsed=<elapsed>s exit=<exit_trigger> [dev_cycle=N]
<ISO-TS> INFO META [run-end] agent_calls=N content_blocks=X thinking_blocks=Y tool_calls=Z errors=W
<ISO-TS> INFO META [run-end] pr=<url>
phase=complete indicates success; phase=failed indicates the pipeline terminated
with an error. dev_cycle=N appears only when at least one outer development cycle
has been completed (i.e., at least one commit was made during the run).
When the MCP server crashed and was automatically restarted at least once during the
run, an additional diagnostic line is appended to the [run-end] block:
<ISO-TS> INFO META [run-end] mcp_restarts: N
This count is emitted by PipelineSubscriber.record_mcp_restart() every time
McpSupervisor detects an unexpected MCP server exit and successfully restarts it.
The count accumulates across all retry attempts in the run; if it equals
McpRestartPolicy.max_restarts (default 1000), the run ended with McpServerError.
The exit field reports why the run ended:
|
Meaning |
|---|---|
|
Pipeline reached its terminal success phase |
|
Pipeline hit a terminal failure condition |
|
User cancelled the run (SIGINT / keyboard interrupt) |
|
Pipeline exited for another reason |
Environment Variables¶
Variable |
Default |
Effect |
|---|---|---|
|
|
Deduplicate identical consecutive streaming chunks |
|
|
Emit |
|
|
Append |
|
|
Append |
|
unset |
Disable all ANSI colour output (any value) |
|
unset |
Force ANSI colour even when stdout is not a TTY (any value) |
|
unset |
Force compact mode display; set to |
|
unset |
Override terminal width; positive integer |