Companion Status UI for AI Assistants: Making Work Visible
AI coding assistants often work in the background, leaving users unsure whether the assistant is stuck or finished. This article explains a companion status UI built around idle, working, and done states, reliable completion detection through lifecycle events, tool-label display, a simple state-machine implementation, resource and privacy boundaries, and practical criteria for adoption.
Why Status Feedback Matters
AI coding assistants usually run in the terminal or at the side of an editor. After a user issues a command, the assistant may be reading files, executing commands, modifying code, or simply generating text. Most of this happens in the background, and users can often judge whether the assistant is still working only by whether the output refreshes.
This creates two problems. First, users cannot tell which step the assistant is on, so they may assume it is stuck and interrupt it or repeat the request. Second, users cannot easily distinguish “normal completion” from “cancellation.” When a turn is cancelled or exits early due to an error, the last output on screen may look very similar to a normal completion.
Status feedback turns these hidden processes into stable, low-distraction signals. It does not change the assistant’s capabilities; it only helps users understand current progress more quickly.
Three Core States and Exception Paths
Breaking the assistant’s run into three main states covers most common scenarios:
- Idle: no task in progress, waiting for user input.
- Working: the assistant is processing a request and may be calling tools.
- Done: a turn has ended normally and the user needs to be told clearly.
Exception paths also need handling. Interruptions and errors should return to idle, but they must not trigger completion feedback. This way, when users see a “done” marker, they can trust that the turn truly finished.
State transitions can be described with a simple finite state machine:
Idle --request received--> WorkingWorking --normal end--> Done --hold for a while--> IdleWorking --interrupt or error--> Idle (no completion)
The hold duration for the done state is only an example and can be adjusted for the product experience. The key is that the done state has an explicit hold time and is triggered only by normal completion.
Showing the Current Tool in the Working State
The working state carries the most information. If the interface only says “working,” users still do not know what the assistant is doing. A more useful approach is to display the name of the current tool in the text area, such as “reading file,” “running command,” or “searching code.”
There are three design considerations:
- Use generic verbs or capability categories rather than exposing internal function names, so readers from different backgrounds can understand them.
- Tool switches need rhythm. If the label changes several times per second, the text flickers and becomes hard to read. Set a minimum display time, a few hundred milliseconds is enough.
- When there is no tool call, fall back to a generic description such as “thinking” instead of leaving the text area blank.
Reliably Determining Completion
The reliability of the completion signal directly determines users’ trust in the interface. The logic should be based on explicit lifecycle events rather than guessing whether output has stopped.
A common approach is as follows:
- Subscribe to the request start event and enter the working state.
- Subscribe to tool call start and end events and update the displayed label.
- Subscribe to the turn end event and enter the done state only when the reason is normal completion.
- Subscribe to interrupt and error events, return directly to idle, and clear the done marker.
If the environment does not provide these events, the only fallback is to infer completion from output silence timeouts. However, timeout-based detection can mistake a long thinking period for completion, so this limitation must be documented.
Example Implementation
The following code shows only the skeleton of the state machine. The event method names are illustrative and need to be replaced with the interfaces actually provided by the environment.
from enum import Enumimport timeclass State(Enum):IDLE = "idle"WORKING = "working"DONE = "done"class CompanionState:DONE_HOLD_SECONDS = 8def __init__(self):self.state = State.IDLEself.current_tool = Noneself.done_at = Nonedef on_turn_start(self):self.state = State.WORKINGself.current_tool = Nonedef on_tool_start(self, tool_label):if self.state == State.WORKING:self.current_tool = tool_labeldef on_turn_end(self, reason):if reason == "completed":self.state = State.DONEself.done_at = time.monotonic()else:# Interrupt or error: return to idle without showing doneself.state = State.IDLEself.current_tool = Nonedef tick(self):# Must be called periodically to time out the done stateif self.state == State.DONE and time.monotonic() - self.done_at >= self.DONE_HOLD_SECONDS:self.state = State.IDLE
This code has two key points. First, state is modified only in event callbacks, while the UI layer is responsible only for reading state and rendering it. Second, the fallback from the done state is time-driven and decoupled from the assistant’s own runtime logic.
Resource Use and Privacy Boundaries
The value of a companion-style interface lies in low distraction, so implementation should control costs:
- Read only state and tool names; do not participate in task decisions or modify the assistant’s behavior.
- Use simple frame switching for animation and avoid continuous high-frequency redraws that consume resources.
- Do not collect conversation content; keep only the state enum and generic tool labels to reduce privacy risk.
The last point is especially important. Users may allow the interface to show “working,” but they may not be willing to let it record or upload conversation content. A clear data boundary reduces user concerns.
Observations on Open-Source Distribution
This type of component does not solve a specific production problem, and feedback after release often differs from that of common tools. A developer once released a small plugin that only changed the background image and did no actual work; it still received considerable attention, and others copied the code and continued modifying it in their own versions.
This suggests a few takeaways:
- For developers, the sense of companionship and emotional value meet real needs and are worth considering separately.
- Before release, clearly state what the component does and does not do, so users do not assume it has functionality.
- License terms and reuse rules should be written in the repository so others can safely build on it.
Criteria for Adoption
Whether a team needs this type of interface depends on two things: whether long-running tasks often make users uncertain, and whether users frequently interrupt the assistant because they do not know the progress.
Evaluation can compare four dimensions:
- Implementation cost: the state machine itself is simple; the main work is event integration and UI rendering.
- Maintenance cost: if the dependent event interfaces change, the integration must be updated accordingly.
- Workflow interference: the interface should be hideable or shrinkable and should not occupy critical operation areas.
- Information accuracy: the state must match actual execution; a false completion indicator is worse than no indicator.
If a team’s main goal is automation and troubleshooting, it should prioritize logs and observability. If the main goal is to keep users informed of progress, a clearly bounded status interface with accurate detection can provide a noticeable experience improvement at low cost.
