An AI coding agent can read a repo, edit a dozen files, and open a PR that passes its own tests. The moment that PR enters the delivery pipeline, the agent goes dark. Failed builds, flagged CVEs, latency regressions, and incident traces accumulate downstream, but none of that evidence finds its way back to the agent that wrote the change.
That gap is what Harness is trying to close with two pieces of infrastructure: the Code Context Engine (acquired from Augment Code as part of the Cosmos acquisition on October 8, 2026) and the Software Delivery Knowledge Graph.
Two kinds of context, two different tools
A repository tells an agent how code works. It does not tell the agent which services are business-critical, which environments will receive the change, or what the last deployment did to latency. Harness splits the problem accordingly.
The Code Context Engine indexes a codebase so an agent can retrieve relevant code and its relationships rather than grepping files. Harness reports it indexes in real time across 100M+ lines, including commit history and which code is still active. It uses embedding models trained on code structure rather than generic text embeddings, because similar-looking code is often semantically unrelated. It is exposed over MCP, so any compatible agent can use it.
The Software Delivery Knowledge Graph models how software is built, tested, secured, deployed, and operated. Harness reports 80+ entity types spanning CI, CD, security, cost, and runtime. For one representative query (which pipelines have the highest failure rate across services and vulnerabilities), Harness’s internal benchmarking estimates roughly 250,000 to 350,000 input tokens and 5+ LLM calls through raw MCP API calls, against roughly 12,000 tokens and 2 to 3 calls through the graph. Harness labels these figures internal benchmarking and does not describe the method, so treat them as an order-of-magnitude illustration for one query rather than a published benchmark.

What the retrieval benchmark showed
Augment Code measured the effect of retrieval quality in its February 2026 Context Engine MCP benchmark. The test ran 300 Elasticsearch pull requests with three prompts each, 900 attempts total, scored on correctness, completeness, best practices, code reuse, and unsolicited documentation. Adding the Code Context Engine improved results by 80% for Claude Code, 71% for Cursor, and 30% for Cursor with Composer-1. These are Augment’s own results on one codebase. They show retrieval quality moves agent output. They do not predict the gain on your repository.
The benchmark also showed that a weaker model with strong context (Sonnet with the MCP) can outperform a stronger model with poor context (Opus without it). MCP-enabled runs needed fewer tool calls and conversation turns.
️ What is shipped vs. what is planned
Cosmos is now the Harness Cosmos Software Factory Agent, sitting inside the Harness Autonomous SDLC Platform alongside Software Delivery, Security Testing, Runtime Protection, and Cost Management agents. The governed software factory post (published October 13, updated October 19) describes a working CVE remediation flow: a scan flags a critical CVE, an Expert uses the Code Context Engine to find where the vulnerable dependency is imported, the Knowledge Graph surfaces which production services are affected and their SLO budget, fixes open as PRs, and Continuous Verification watches each deployment with automatic rollback if behavior deviates.
The two-way connection between the Code Context Engine and the Knowledge Graph is described in the announcement as planned work. That means delivery context informing a change before it is written, and runtime findings flowing back into the engineering workflow, is direction rather than a shipped feature. The practical reading: an agent can use both kinds of context in one workflow today, and the tighter feedback loop is still being built.
Governance layer worth noting
Pipeline work runs on Delegates inside the customer’s own network. A Zero Trust Service checks every task before it runs. Shell scripts are parsed into an AST and checked against a command allowlist, container images against a registry allowlist, and each step against the resolved pipeline YAML. The service fails closed, so nothing executes if it is unreachable. An agent recommendation grants no permission to deploy: policy as code, RBAC, approval gates, and continuous verification decide what proceeds.
Cosmos is available now. The Context Engine MCP setup docs are at Augment’s MCP docs. The Knowledge Graph validation write-up reports 22 of 27 scenarios validated, roughly 81% coverage, if you want to assess how much to trust its answers before building on them.

