Agentic Coding with Chinese LLMs: Context Management and Toolchain Practices

    Hands-on experience using a flagship Chinese large language model for agentic coding: what worked, where it struggles, and practical strategies for context management, toolchain simplification, and cost control in command-line Agent tools.

    1. Scope of This Test

    This article is based on the author’s personal experience and publicly available community discussions. During the gray-scale (limited beta) testing of a new flagship model from a major Chinese AI vendor, the author used a command-line Agent coding tool to complete several code modification, refactoring, and debugging tasks. The test had no standardized benchmark and a limited sample size, so the observations here should be treated as anecdotal rather than definitive.

    Agentic Coding refers to the full loop in which a model plans, calls tools, reads and writes code, runs verification, and iterates on fixes within an Agent framework. It differs fundamentally from traditional code completion: completion only predicts what follows the cursor, while Agentic Coding requires the model to maintain an understanding of the project structure across dozens of interaction rounds.

    In the author’s experience, this model performed close to leading international models on some tasks. It worked noticeably better in command-line Agent tools than in traditional IDE-based coding plugins—likely because the two tool types differ in interaction style and how context is injected.

    2. The Main Issue: Slow Response Times

    The most noticeable problem was high response latency, which may come from three sources.

    First, inference capacity during the beta phase is limited, and queuing and rate limiting add waiting time. This is typically a temporary provider-side issue; check the vendor’s official announcements for current status.

    Second, larger models cost more to run and respond more slowly per request.

    Third, judging from its output behavior, the model appears to have undergone post-training with longer chains of thought—it prefers to think things through before acting. This is a deliberate trade-off: spending inference time to improve success rates on complex tasks.

    For Agentic Coding, the author believes end-to-end success rate matters more than single-step speed. If a fast model requires repeated manual corrections, total time may actually be longer. But this holds only when the task genuinely requires deep reasoning. For simple code edits, excessive thinking just wastes time and quota. The ideal approach is to dynamically allocate thinking budget based on task difficulty—an area the industry is actively exploring.

    3. Context Management

    The typical problem in long sessions is context bloat. In the author’s usage, once the session context grew beyond a certain size, the model’s memory of earlier agreements degraded. It might forget previous decisions, repeat completed operations, or even revert correct changes made earlier. The exact threshold depends on the model version, task type, and the tool’s context settings, so this article won’t give a specific number.

    Here are some strategies to address this.

    3.1 Monitor Context Usage

    Use your tool’s built-in usage indicator or community status plugins to track current consumption. Below are the author’s personal starting thresholds, which you can adjust for your project:

    1. Usage < 50% : Normal operation
    2. 50% ~ 70% : Prepare to compact after finishing the current atomic task
    3. > 70% : Compact as soon as possible, or consider starting a new session

    3.2 Back Up Before Compacting

    Compaction rewrites conversation history into a summary, which may lose details. Before compacting, make sure to:

    • Confirm all code changes are saved—ideally committed to version control—so the summary doesn’t diverge from the actual files;
    • Write current progress, pending items, and known risks into a task log file;
    • Copy important conversation records or decision documents for later reference.

    After compaction, ask the model to restate the current task goal and next steps, then compare against your task log. If they don’t match, correct the model before continuing.

    3.3 Start a New Session After Each Milestone

    Once a complete phase is finished, starting a fresh session is usually more efficient than dragging along a large old context. At the start of a new session, have the model read the project’s task list and architecture notes first.

    3.4 Persist Knowledge in Files

    Capture key decisions, project structure, and coding conventions as Markdown documents—such as task lists and architecture notes—and reference them at the start of every session. The principle is simple: persistent knowledge goes in files, temporary context stays in the conversation. This practice is widely used in the community and is especially valuable for long-term projects.

    4. Keep the Toolchain Lean

    Another commonly overlooked issue is mounting too many tools. Many people enable every available MCP tool and Skill, assuming more capability is always better. But in the author’s testing, the model already handled most coding tasks in a bare setup, and extra tools introduced two problems.

    First, tool descriptions and parameter schemas live permanently in the system prompt, consuming large amounts of context. The more tools mounted, the less room left for code and conversation.

    Second, as the number of tools grows, ambiguity in tool selection increases, and call accuracy may drop.

    Recent community discussions on Harness Engineering—the engineering of the runtime framework—focus exactly on this. The same model can perform very differently under different tool configurations. Ways to optimize:

    • Mount only the tools required for the current task, and unmount them when done;
    • Remove instructions in the system prompt that are irrelevant to the current task;
    • Consolidate frequent operations into short scripts instead of complex general-purpose toolchains.

    After each adjustment, record context usage and task completion before and after. Only then can you judge whether a change actually helped, rather than relying on gut feeling.

    5. Cost and Compliance

    Subscription quotas need ongoing monitoring. The author occasionally noticed sudden spikes in token consumption with no identifiable cause. Possible factors include context bloat, overly long tool descriptions, or genuinely more complex tasks—so when you see anomalies, check these common culprits first.

    On compliance, follow these principles:

    1. Only access model capabilities through the provider’s official APIs or legitimate channels, and read the terms of service carefully.
    2. For enterprise use, have legal and security teams review the terms of service and data security before adopting third-party models or building your own gateway.
    3. You can implement model allowlists, cost monitoring, and anomaly alerts on your own gateway, but you should not attempt to bypass the provider’s routing checks or other usage restrictions.
    4. If you find request content being unexpectedly modified, or injected content of unknown origin, stop using the service in that scenario, document what happened, and contact the provider to verify.

    6. Conclusion

    For now, Chinese models already perform well on some Agentic Coding tasks, but response speed, context stability, and the tool ecosystem still have room to improve. The author’s personal experience only indicates general direction and cannot represent all scenarios.

    The advice for developers boils down to three points: prefer command-line Agent tools; monitor context usage regularly, back up before compacting, and persist project knowledge in files; and mount only the tools the current task requires. From there, adjust your strategy based on your own tasks and budget.