API and CLI
Click to enlarge
Context optimization
How Conflux keeps long CLI/API work usable without corrupting the user's prompt.
Click to enlargeWhy it exists
CLI and API clients can send very large histories with tool results, diffs, test output, logs, and generated artifacts. Sending everything unchanged is safest but can exceed model context limits. Blindly compacting the whole payload is dangerous because it can damage the user's current instruction or the CLI's own working memory.
Safe optimization order
What it does not change
Context optimization does not rewrite the user's latest prompt as a routing trick, does not replace the client conversation history on the first attempt, and does not promote compacted evidence into durable memory by itself. It preserves high-signal evidence and lets memory cite it as supporting context.