Wait-State Visualization for AI Coding Tools: A Low-Intrusion Status Companion

    AI coding tools often spend minutes in multi-step execution rather than completing code changes instantly. This article presents a low-intrusion status companion design for making those wait periods observable without faking progress: a five-state machine, an event adaptation layer, privacy-minimized step normalization, and terminal or desktop renderers with graceful degradation. It also covers trustworthy completion states, folded subagent events, clean extension lifecycle, and boundary tests for duplicate, out-of-order, interrupted, and error events.

    Wait-State Visualization for AI Coding Tools: A Low-Intrusion Status Companion

    1. Background: Why the Minutes Spent Waiting for AI Code Changes Matter

    When an AI coding tool modifies code, it usually does not issue a single instantaneous request. Instead, it runs multiple rounds of model inference and tool calls: reading files, retrieving context, executing commands, writing patches, running tests, and revising based on results. For developers, these minutes are both a waiting period and a high-risk period for context switching. If the interface provides no clear feedback, users easily form three questions: Is the task still progressing? Which step is it stuck on? Has this round actually ended?

    Traditional progress bars are a poor fit for this scenario. The number of steps in an AI coding task is not fixed, individual step durations vary widely, and some steps may be interrupted or retried. A better approach is not to fabricate a percentage but to provide perceptible states: idle, running, done, interrupted, or error, with the current step type shown during execution. This avoids promising inaccurate progress while significantly reducing waiting anxiety.

    From an engineering adoption perspective, purely functional tools often require users to understand their value before adopting them. Immediate, lightweight feedback is easier to try. The “status companion” discussed in this article is this kind of design: it does not participate in code generation, does not change host behavior, and only maps the runtime state of the AI coding tool to a low-distraction visual character so developers can glance at it and know what is happening.

    2. Design Principles: Low Intrusion, Single State Source, Cross-Client Consistency

    Status visualization must first define its boundary: it is an observer, not a controller. The design should follow these principles.

    1. Low intrusion: Do not modify the host’s core flow, intercept tool calls, or inject business logic. Only subscribe to state events and render.
    2. Single state source: All rendering clients share the same state reducer to avoid inconsistency between terminal and desktop clients.
    3. Perceptible but non-disruptive: By default, do not show pop-ups, steal focus, or block input; display only at the side or near the conversation.
    4. Cross-client consistency with rendering degradation: The same state model can map to terminal character art, desktop pixel art, or plain text; when capabilities are insufficient, degrade automatically.
    5. Minimal privacy: Read only task state and step type; do not collect code content, file paths, command arguments, or other sensitive information.
    6. Extensibility: Character appearance, animation frames, and copy can be replaced, while the state machine and event adaptation layer remain stable.

    These principles determine the architecture: event collection and state reduction are the core, and rendering is only a pluggable presentation layer.

    3. State Machine Modeling: Expressing Complex Execution with Finite States

    It is recommended to converge states into five categories: idle, running, done, interrupted, and error. The running state may carry the current step type, such as reading or writing files, executing commands, retrieving context, or running tests. The done state should remain briefly and then return to idle; errors and interruptions should return directly to idle to avoid misleading users with a “celebration” state.

    The following pseudocode expresses only the idea of state reduction and does not represent any real host interface:

    1. type State = 'idle' | 'running' | 'done' | 'interrupted' | 'error'
    2. function reduce(prev, event):
    3. if event.type == 'turn_start':
    4. return { name: 'running', step: 'thinking' }
    5. if event.type == 'tool_start' and event.isMainSession:
    6. return { name: 'running', step: event.toolCategory }
    7. if event.type == 'turn_end':
    8. return { name: 'done', until: now() + 8s }
    9. if event.type == 'turn_interrupted':
    10. return { name: 'idle' }
    11. if event.type == 'turn_error':
    12. return { name: 'error', then: 'idle' }
    13. if prev.name == 'done' and now() >= prev.until:
    14. return { name: 'idle' }
    15. return prev

    Key details include: set a short timeout for the done state; the error state can be shown briefly and then return to idle; subtask or subagent events are folded by default, reflecting only the main session state to avoid high-frequency jitter in expressions and copy; events must be idempotent, and duplicate events must not change the final state; out-of-order events can be discarded as stale using turn identifiers and timestamps.

    4. Event Collection and Architecture Layering

    The overall architecture can be divided into four layers: host event source, adapter layer, state reducer, and renderer. The host event source provides common events such as turn start, tool call start/end, turn end, interruption, and error. The adapter layer filters the main session, normalizes step types, and redacts tool names. The state reducer maintains the single state. The renderer selects the presentation based on the terminal or desktop environment.

    Illustrative structure:

    1. Host events -> Adapter (filter / normalize / redact)
    2. -> State reducer (single state)
    3. -> Renderer (terminal character art / desktop pixel art / plain text)

    The adapter layer should expose only coarse-grained step types, not raw commands or file paths. For example, normalize “read a file at a certain path” to “reading file”, and normalize “execute a certain command” to “executing command”. This preserves perceptibility while reducing privacy risk. The state reducer should not depend on rendering details, and the renderer should not modify state in reverse.

    5. Multi-Client Rendering: Trade-offs Between Terminal Character Art and Desktop Pixel Art

    Terminal environments have clear constraints: limited column width, large font differences, and restrained refresh rates. Half-block characters can be used to compose a bust, with a fixed grid such as 36 columns × 16 rows, fewer colors, and a stable frame rate. Wide terminals (for example, 144 columns or more) can show it automatically at the side, while narrow terminals can degrade to a single-line text status. Desktop clients can use full-body pixel art with stronger expressiveness, but they should also keep refresh rates and resource usage low.

    The rendering layer should support degradation: output text such as “Running: reading file” or “Done” when graphics cannot be displayed; switch only static frames when animation is unsupported; hide the character and keep only the status line when the terminal is too narrow. All rendering should be disableable, and no layout placeholder should remain after unload.

    6. Extension Integration and Installation Experience

    Integration should follow the host’s existing extension mechanism as closely as possible: register a status listener and shortcut commands through the extension entry, and users can enable it after a single installation action. Terminal and desktop clients each use their corresponding entry points, without requiring users to configure complex parameters. After installation, it should work out of the box: default character, default status copy, and default side position; no forced persona setup and no additional interaction training.

    At the same time, uninstallation must be clean: remove event subscriptions, clean up temporary files, and restore layout. Permissions should be minimized: request only the capabilities needed for status events and rendering, and do not request permission to read code content.

    7. Engineering Trade-offs and Practical Experience

    First, the done state must be trustworthy. Show the done state only when the turn has truly ended; do not show celebration animations for interruptions or errors, and return directly to idle to avoid user misjudgment. Second, the done state should not last too long; returning to idle after a few seconds is sufficient. Third, subagent events should be folded; otherwise, the state will switch frequently and add noise. Fourth, step types should be redacted, and complete commands and paths should not be shown. Fifth, rendering performance should be restrained; an excessively high terminal refresh rate causes flicker and wastes resources. Sixth, the state machine should be tested: duplicate events, out-of-order events, timeouts, interruptions, errors, and rapid consecutive turns should all be covered.

    8. Practical Checklist

    • Define a five-state state machine and a done-state timeout;
    • Establish main-session filtering and subtask folding rules;
    • Perform coarse-grained normalization and redaction of step types;
    • Decouple the rendering layer from the state layer and support text degradation;
    • Use a fixed terminal grid, a wide-screen sidebar, and narrow-screen hiding;
    • Provide complete extension registration and uninstall paths;
    • Do not collect code content or command arguments;
    • Cover boundary tests for duplicate, out-of-order, interrupted, and error events.

    9. Conclusion

    The minutes an AI coding tool spends changing code should not become an information black box. A low-intrusion status companion does not replace productivity tools; it converts existing host states into perceptible feedback: waiting when idle, showing the current step during execution, briefly confirming completion, and truthfully falling back on errors. Its engineering value lies in a clear state machine, robust event adaptation, degradable multi-client rendering, and clear privacy boundaries. For developer experience design, such “tools that do no work” can effectively reduce waiting anxiety and provide a lightweight observability path for AI coding tools.