SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.03743 · 2026

Can LLMs Test Terminal User Interfaces?

Chao Peng, Jacques Klein, Tegawendé Bissyandé, Cuiyun Gao, Ajitha Rajan, Ruida Hu

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2608.03743.json · badge: /api/ran/2608.03743.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
tui-testing/tuicov canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
tui-testing/tuibot canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
build_recap Ran
ran; our contract draft was wrong, not the code
tui-testing/tuibot/src/tuibot/agents/explorer.py
code served (permissive licence) · get_code("1e6beec9f1848a60")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Sequence

torch.manual_seed(0)

# Construct arguments for build_recap
entries = [
    "User asked about Python",
    "Assistant explained list comprehensions",
    "User asked about decorators",
    "Assistant provided decorator examples",
    "User thanked the assistant"
]

limit = 3

ARGS = {
    "entries": entries,
    "limit": limit
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
inputs_dir Ran
ran; our contract draft was wrong, not the code
tui-testing/tuibot/src/tuibot/entrypoint.py
code served (permissive licence) · get_code("1d2df3f0f117473c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path

ARGS = {
    'run_dir': Path('/tmp/test_run')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalized_file_name Ran
ran; our contract draft was wrong, not the code
tui-testing/tuicov/src/tuicov/models.py
code served (permissive licence) · get_code("c865fb88e9a79cde")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path

# Create a temporary root directory path
root = Path("/tmp/test_root")

# Create a file_name that is relative to root
file_name = "subdir/file.txt"

# Construct the ARGS dictionary
ARGS = {
    "root": root,
    "file_name": file_name,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_duration Ran
ran, honoured the contract we drafted
tui-testing/tuicov/src/tuicov/util.py
code served (permissive licence) · get_code("d13b1f314eae32ac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

_DURATION = re.compile('^\\s*(\\d+(?:\\.\\d+)?)\\s*(ms|s|m)?\\s*$')

def parse_duration(value: str) -> float:
    match = _DURATION.match(value)
    if not match:
        raise ValueError('duration must look like 500ms, 2s, or 1.5m')
    number = float(match.group(1))
    unit = match.group(2) or 's'
    seconds = number / 1000 if unit == 'ms' else number * 60 if unit == 'm' else number
    if seconds <= 0:
        raise ValueError('duration must be greater than zero')
    return seconds


ARGS = {
    'value': '500ms'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_listen Ran
ran; our contract draft was wrong, not the code
tui-testing/tuicov/src/tuicov/service.py
code served (permissive licence) · get_code("b7e42a0d48fbc6b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ipaddress
from typing import Tuple

def parse_listen(value: str) -> Tuple[str, int]:
    host, separator, port_text = value.rpartition(':')
    if not separator:
        raise ValueError('listen address must be HOST:PORT')
    if host.startswith('[') and host.endswith(']'):
        host = host[1:-1]
    if host == 'localhost':
        host = '127.0.0.1'
    try:
        address = ipaddress.ip_address(host)
    except ValueError as error:
        raise ValueError('listen host must be a loopback IP address') from error
    if not address.is_loopback:
        raise ValueError("tuicov's collection service may only bind to loopback")
    port = int(port_text)
    if port < 0 or port > 65535:
        raise ValueError('listen port must be between 0 and 65535')
    return (host, port)

ARGS = {
    'value': '127.0.0.1:8080'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_text Ran
ran; our contract draft was wrong, not the code
tui-testing/tuicov/src/tuicov/util.py
code served (permissive licence) · get_code("59fbe599a8d2d6de")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path
import tempfile
import os

# Create a temporary file with valid UTF-8 content
temp_dir = tempfile.mkdtemp()
temp_file = Path(temp_dir) / "test.txt"
temp_file.write_text("Hello, world!", encoding='utf-8')

ARGS = {
    "path": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
relative_capture Ran
ran; our contract draft was wrong, not the code
tui-testing/tuibot/src/tuibot/agents/explorer.py
code served (permissive licence) · get_code("3651aace47411392")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path

# Create test paths for the relative_capture function
# Case 1: path is relative to workspace
workspace = Path("/home/user/project")
path = Path("/home/user/project/data/captures/capture_001.pkl")

# Case 2: path is outside workspace (will use except branch)
path_outside = Path("/tmp/external/capture.pkl")

ARGS = {
    "path": path,
    "workspace": workspace,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_command Ran
ran; our contract draft was wrong, not the code
tui-testing/tuibot/src/tuibot/process.py
code served (permissive licence) · get_code("f12b4c26b065495c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import asyncio
from dataclasses import dataclass
from typing import Mapping, Protocol, Sequence

@dataclass(frozen=True)
class CommandResult:
    args: tuple[str, ...]
    returncode: int
    stdout: str
    stderr: str

    @property
    def ok(self) -> bool:
        return self.returncode == 0

    def message(self) -> str:
        """The most useful line of output, for error messages."""
        for stream in (self.stderr, self.stdout):
            text = stream.strip()
            if text:
                return text.splitlines()[-1]
        return f'exit code {self.returncode}'

    def diagnostic(self, *, max_lines: int=40, max_chars: int=8000) -> str:
        """Return a bounded stdout/stderr tail suitable for a persisted error."""
        sections: list[str] = []
        for label, stream in (('stdout', self.stdout), ('stderr', self.stderr)):
            lines = stream.strip().splitlines()
            if lines:
                sections.append(f'{label}:\n' + '\n'.join(lines[-max_lines:]))
        detail = '\n'.join(sections) or f'exit code {self.returncode}'
        return detail[-max_chars:]

class CommandTimeout(Exception):
    """A command exceeded its timeout and was killed."""

    def __init__(self, args: Sequence[str], timeout: float):
        self.args = tuple(args)
        self.timeout = timeout
        super().__init__(f"timed out after {timeout:g}s: {' '.join(args)}")

def _terminate(process: asyncio.subprocess.Process) -> None:
    try:
        process.terminate()
    except ProcessLookupError:
        pass

async def run_command(args: Sequence[str], *, timeout: float | None=None, stdin: str | None=None, cwd: str | None=None, env: Mapping[str, str] | None=None) -> CommandResult:
    """Run a command to completion, capturing both streams as text."""
    process = await asyncio.create_subprocess_exec(*args, stdin=asyncio.subprocess.PIPE if stdin is not None else asyncio.subprocess.DEVNULL, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=cwd, env=dict(env) if env is not None else None)
    payload = stdin.encode('utf-8') if stdin is not None else None
    try:
        stdout, stderr = await asyncio.wait_for(process.communicate(payload), timeout=timeout)
    except (TimeoutError, asyncio.TimeoutError):
        _terminate(process)
        try:
            await asyncio.wait_for(process.wait(), timeout=5)
        except (TimeoutError, asyncio.TimeoutError):
            process.kill()
        raise CommandTimeout(args, timeout or 0.0) from None
    return CommandResult(args=tuple(args), returncode=process.returncode if process.returncode is not None else -1, stdout=stdout.decode('utf-8', errors='replace'), stderr=stderr.decode('utf-8', errors='replace'))


ARGS = {
    "args": ["echo", "hello"],
    "timeout": 10.0,
    "stdin": "test input",
    "cwd": None,
    "env": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
stable_widget_id Ran
ran; our contract draft was wrong, not the code
tui-testing/tuicov/src/tuicov/util.py
code served (permissive licence) · get_code("1a5bcb6f5c36002e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    'file_name': 'my_module.py',
    'line': 42,
    'column': 15,
    'name': 'my_widget',
    'kind': 'widget'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Terminal User Interfaces (TUIs) combine the stateful, screen-oriented behaviour of GUIs with terminal deployment and are now common in developer tools. Yet they lack a dedicated testing methodology. We survey 197 real-world TUI applications: only 12% of test code exercises the interface, and 45% of those tests never send input, checking a static frame instead. We turn these applications into a headless benchmark spanning ratatui/Rust, bubbletea/Go, textual/Python, and ink/TypeScript, packaging each as an instrumented Docker image. We record line and widget coverage where reliable, rendered terminal states, and crashes. Under equal wall-clock budgets, we compare four frontier LLMs with random exploration. No model dominates. Random is a strong time-budgeted baseline, but its crash advantage comes from higher throughput: per interaction, LLM guidance is more efficient and uniquely reaches input-gated faults. Automatically deriving launch inputs yields the largest practical gain, enabling applications that otherwise never start. Line coverage poorly predicts crash discovery, weakening it as a proxy for test effectiveness. Automated TUI testing is feasible but far from solved, and honest baselines matter more than model choice. We release the coverage tool tuicov at https:// github.com/tui-testing/tuicov and the testing framework tuibot at https://github.com/ tui-testing/tuibot. Testing loop: rendered TUI → tuibot → generate action → exercise TUI ⟲ until the budget is exhausted. Post-run: tuicov measures execution → coverage and crash report. Figure 1: Control flow of the released tuibot and tuicov toolchain. * Chao Peng and Ruida Hu are co-first authors and contributed equally.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2608.03743")
get_code_for_paper("2608.03743")
have("2608.03743")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2608.03743.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2608.03743.svg)](https://syntology.ai/paper/2608.03743)

Connect an agent — have() is free.