Capability Boundaries and Multi-Agent Engineering Practices for AI Coding Systems

    Evaluating an AI coding system means separating model capability from system capability. This article covers task completion, interaction reliability, execution observability, and cost accounting, then explains role-based multi-agent collaboration, risk-based orchestration, Chinese terminal input, nested-agent tracing, and reproducible evaluation.

    1. Separate Model Capability from System Capability

    A coding system that can finish complex tasks is not automatically mature as an engineering product. The model is good at understanding requirements, generating code, and analyzing errors. The surrounding system supplies context, runs tool calls, manages task state, and records resource use. Together they shape the experience, but failures do not come from the same place.

    A UI that misses the requirement may reflect visual understanding or how the requirement was expressed. A change that skips a call site may come from weak code search or poor context assembly. Text that changes after a Chinese paste is mainly an input-system defect. Blaming all of these on “the model not being strong enough” hides the engineering layer that actually needs a fix.

    Evaluate an AI coding system on at least four dimensions:

    • Task completion: Can it understand constraints, apply changes, and pass verification?
    • Interaction reliability: Are input, display, editing, and status feedback accurate?
    • Execution observability: Can the paths of the main task and subtasks be traced?
    • Resource accounting: Are time, model calls, and cost recorded completely?

    Visual polish and feature count affect first use, but they do not replace these measures. In a team setting, an untraceable automatic edit is often harder to handle than an obvious failure.

    2. Multi-Model Collaboration: Gains Come from Clear Roles, Not More Agents

    Models can differ in code reasoning, visual design, long-context handling, and response speed. Turning those differences into engineering value requires explicit duties, not simply more agents.

    A general division of work:

    Role Main responsibility Delivery requirement
    Orchestrator Break down work, order dependencies, merge results An executable plan and a final change summary
    UI design agent Analyze layout, interaction, and visual hierarchy Design constraints, component proposals, and state notes
    Retrieval agent Locate relevant code and project material File locations, evidence, and open questions
    Exploration agent Map dependencies and likely impact Call relationships and change risk
    Repair agent Apply local edits and verify them What changed, test results, and remaining issues

    This split is an architecture reference. It does not mean a given model class is naturally suited to a given role. Real assignments should be checked against representative tasks in the project.

    2.1 The orchestrator keeps final responsibility

    The orchestrator should not only forward work. It must understand the project goal, define acceptance criteria, and check that subtask results agree with each other.

    A UI design task should not return only “make the page look better.” It should also specify loading, error, and empty states, keyboard behavior, and layout constraints across screen sizes. The orchestrator then ties those requirements to the existing component system, business logic, and test conditions.

    2.2 Give each subtask the minimum sufficient context

    Sending every agent the whole repository, the full conversation, and every historical log usually raises cost and makes the real constraints harder to see.

    A more useful input includes:

    • The current goal and the scope that must not be changed
    • Relevant files, interface contracts, and necessary background
    • Facts already confirmed and assumptions still to verify
    • The expected output form
    • Explicit acceptance criteria

    “Minimum sufficient” does not mean “as short as possible.” It means the information needed to finish the task is present, and unrelated material is reduced.

    2.3 Parallel work needs write-conflict control

    Several agents analyzing different modules is usually easier to manage than several agents editing the same file. If parallel tasks all change shared configuration or common components, the system needs conflict detection and a merge path.

    Prefer “analyze in parallel, integrate in series”: subtasks submit suggestions or isolated changes, and the orchestrator checks dependencies and test results before merging. In complex projects, assign a single owner for sensitive files so edits are not overwritten.

    3. Light Orchestration vs. Heavy Workflows: Choose by Risk

    Coding systems often extend workflows with pre-checks, post-run verification, automatic retries, and context cleanup. These mechanisms are useful, but over-configuration adds cost:

    • Repeated context injection increases input size
    • Similar checks fire many times and stretch the task
    • Too many state layers make errors hard to locate
    • Retries that do not change strategy burn resources again
    • Inconsistent constraints across stages produce contradictory instructions

    For a small task with a clear scope, a short orchestration path is often easier to maintain. For high-risk changes, multi-person work, and projects that need an audit trail, extra checks are often required.

    Configure the workflow by risk rather than always choosing the lightest or the heaviest design. A local text tweak can use a short verification chain. Changes that touch shared interfaces, permission boundaries, or data migration should add impact analysis, tests, and human confirmation.

    A stronger model is not a reason to drop safety boundaries. File-write permissions, command scope, protection of sensitive information, and failure recovery remain system responsibilities.

    4. Chinese Terminal Interaction: Correct Display and Correct Input Are Separate

    Chinese issues in a terminal UI are not only “ugly line breaks.” They sit at the boundary between encoding, character edges, display width, and edit state.

    4.1 Bytes, characters, and display columns are not the same

    The number of bytes stored is not the number of columns on screen. In common terminal environments, a Chinese character usually occupies two columns. Some symbols and combining characters behave in more complex ways.

    Truncating by byte offset can split an encoded sequence and produce garbled text. Splitting by character can still break a visible glyph made of several code points.

    Terminal layout should handle these steps separately:

    1. Valid text decoding
    2. Visible character boundaries
    3. Terminal display width
    4. Mapping between cursor position and the original text position

    For complex characters, also account for width differences across terminal environments. Do not assume every environment renders the same way.

    4.2 Mixed Chinese and English needs a deliberate wrap strategy

    Using only the last Latin character or space on a line as a break point can split Chinese paragraphs incorrectly. A better approach is to decide the maximum display width the current line can hold, then choose among allowed break points.

    For ordinary prose, handle punctuation and continuous words appropriately. For paths, code, and long identifiers, still wrap safely when there is no natural break.

    Most important: distinguish visual wrapping from a real line break. Visual wrapping is display behavior only and must not change the text that is eventually sent.

    4.3 A paste summary must not become part of the message

    After a long paste, the UI may show a hint such as “several lines pasted” so the input box is not filled with a large block. That hint is display information. It must not become part of the actual input.

    The input system should keep real content separate from display state. On submit, read the authoritative text buffer. Do not reconstruct the message by scraping what the UI shows.

    Verification should not stop at screenshots. Compare the pasted source with the final submitted text. Cover Chinese-only text, mixed Chinese and English, multi-line text, insertion into existing content, and further editing after paste. Input correctness is a baseline quality bar.

    5. Nested Agent Monitoring: Execution Should Be Traceable

    Showing only the main agent and its direct children leaves deeper work in a blind spot. A user may know that a task is “still running” without knowing whether it delegated further work, is waiting on a tool, or has entered a retry loop.

    A typical execution relationship:

    Main task
    ├─ UI design task
    │ └─ Component-constraint retrieval
    └─ Code change task
    ├─ Dependency analysis
    └─ Test verification

    Each execution unit should have a unique ID, a parent task ID, a run state, and start and end times. The event log should at least record task creation, model calls, tool execution, retries, cancellation, and the final result.

    5.1 Do not expand every log by default, but keep them accessible

    To avoid a crowded UI, show an execution-tree summary by default and expand a node on demand. Simplifying the view must not drop the underlying record.

    A user should be able to answer:

    • Which task created the current subtask?
    • What is this node doing now?
    • Where did the failure occur?
    • Which subtask results does the final conclusion depend on?

    5.2 Cancellation and failure need explicit semantics

    When the main task is cancelled, the system must decide whether still-running descendants stop. Stopping orchestration does not necessarily mean an external request already sent has been revoked. The UI should distinguish those states honestly.

    For a call that cannot be interrupted, record its later result, but do not automatically merge a stale result into a new run. Otherwise the user may still see files change or cost keep rising after the task has ended.

    6. Cost Accounting: Use the Call Ledger, Not the UI Message

    Estimating cost only from the latest message shown by the main agent usually misses the full spend of a multi-agent run. Subtasks, retries, context cleanup, and calls that were never displayed can all be omitted.

    Reliable accounting should rest on the underlying call record:

    Total task cost = sum of all attributed call costs + other measurable execution fees

    The cost of each call should be computed from actual usage and the pricing rules that apply. Whether input, output, and cache-related usage are priced separately must follow the real rules. Do not assume every model uses the same scheme.

    6.1 Record calls, then aggregate

    A call record should include task attribution, execution unit, time, usage, pricing basis, and calculation status. If actual usage cannot be obtained, mark it unknown or estimated. Do not default it to zero.

    That distinction supports:

    • Direct cost of the current node
    • Cumulative cost including descendant tasks
    • Cumulative cost of the whole session
    • Confirmed cost versus estimated cost

    6.2 Tree rollups must not double-count

    If a parent’s cumulative cost already includes its children, adding every node’s cumulative value again double-counts the task total. Sum unique call records, then build views at different levels from the task relationship.

    6.3 Local estimates should be reconcilable

    Real bills can differ because of pricing versions, settlement precision, and other rules. Keep raw usage and the calculation basis so later checks are possible. Budget alerts should also state whether the current figure is an estimate or a confirmed result.

    7. Build a Reproducible Evaluation Method

    The gap between two coding approaches should not be judged from a single successful demo. A fairer method uses the same code baseline, the same requirements, and similar resource constraints, then runs representative tasks.

    Suggested coverage:

    Test type What to observe
    Local defect fix Whether the change is minimal and related tests pass
    Cross-module refactor Whether call relationships stay complete and interface contracts hold
    UI development State coverage, interaction consistency, and usability
    Long Chinese text input Whether submitted content is accurate and editing stays stable
    Nested task execution Whether the full chain is visible and cancellation works
    Failure and retry Whether work is repeated and state recovers correctly
    Cost accounting Whether subtasks are attributed and whether costs are missing or double-counted

    Report task success rate, completion time, human interventions, actual cost, and variance across repeated runs. Analyze differences from model configuration and from orchestration strategy separately so system capability is not confused with model capability.

    8. Conclusion: Maturity Depends on Whether the Base Path Is Trustworthy

    The value of multi-model collaboration is assigning different strengths to suitable tasks and lowering coordination cost with clear delivery contracts. It is not a benefit that appears simply because more agents were added.

    A coding system worth using over time must do more than generate and edit code. Input must not be corrupted. Task relationships must be traceable. Failures must be recoverable. Cost must be accountable. Final results must be verifiable.

    Individual developers can start with a simple orchestration path and add roles around the tasks they use most. Teams and organizations should first check permission control, execution records, cost attribution, and regression testing. Only when those base paths are reliable does more complex automation move from a demo into steady productivity.