# Does a context tool know what is actually deployed versus what the repo says when debugging?


URL: https://getunblocked.com/answers/context-tool-deployed-vs-repo-when-debugging/
Published: 2026-11-20T17:00:00Z
Updated: 2026-11-15T20:38:44Z
Author: Dennis Pilarinos
Categories: Context Engine, Engineering Insights

**Short answer:** Not from the repo alone. A tool that indexes code sees the default branch, not the build running in production, its flags or its config. It knows what is deployed only if it can read a source that records it. Unblocked indexes code and PRs and queries Datadog logs, metrics and APM span counts live when you ask, so it can check both sides.

---
Not from the repo alone. A context tool that indexes your code knows what the main branch says. Production can be running something else: an older build, a build with a flag turned on, or the same build with a different timeout. It knows what is deployed only when it can read a source that records it, such as your monitoring tool or error tracker. Unblocked works this way. It indexes code from each repo's default branch and syncs pull requests in real time. When you ask a question, it queries Datadog logs, metrics, monitors and APM spans live, so one answer can set what the code says next to what production is doing.

**Deployed state** is what is actually running right now: which build or commit, in which environment, with which flags and config values. The repository describes what you intended to ship, while deployed state is what you actually shipped, plus every change made since without a commit.

## What a repo index cannot see

**A repo index** is a searchable snapshot of one branch of your code. Unblocked's GitHub docs say it "indexes source code from your repository's default branch at least once every 8 hours" ([Unblocked GitHub docs](https://docs.getunblocked.com/data-sources/github.md)). Changes on other branches appear only after they merge into it. That design suits questions about how the code works, but during debugging it leaves four gaps.

- **Which commit is live.** A pull request merged an hour ago is in the index. It may not have shipped, or it may have shipped and been rolled back.
- **Feature flags.** OpenFeature calls a flag "an if/else statement that can be controlled at runtime" ([OpenFeature docs](https://openfeature.dev/docs/reference/intro)). The code shows both branches, and only the flag tool knows which one is running.
- **Config and infrastructure.** A timeout changed in a console or a Helm value set per environment never appears in the app repo.
- **Environment drift.** Staging and production can run different versions of the same service simultaneously.

So an agent that reads the code and says "this retries five times" is right about main, and production is a separate question. CloudIR-Bench, an October 2026 benchmark of 950 real incident reports from five large cloud systems, found that "LLMs achieve modest RCA correctness (26.4%)" ([Tran et al., arXiv](https://arxiv.org/html/2610.29185v1)). In one case the model blamed "the backend service, API, or database". The real cause was "a configuration change in the Global Service Load Balancer".

## Where the deployed version is written down

Most teams already record the live version somewhere a tool could read it.

- **Monitoring tags.** Datadog's unified service tagging reserves `env`, `service` and `version`. It says "the version tag is expected to change with each new application deployment" ([Datadog docs](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/)). OpenTelemetry's `service.version` does the same, with example values such as `2.0.0` or `a01dbef8a` ([OpenTelemetry](https://opentelemetry.io/docs/specs/semconv/resource/service/)).
- **Error tracker releases.** Sentry defines a release as "a version of your code deployed to an environment" ([Sentry docs](https://docs.sentry.io/product/releases/)). With commits linked, it shows "the issues and regressions introduced in a new release".
- **The orchestrator.** In Kubernetes, the image tag in a Deployment's pod template is what its pods run, and each rollout creates a revision ([Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)).
- **The flag tool's change history**, usually the only record of a flag flipped without a deploy.

| Question while debugging | Repo index answers it? | Where the answer lives |
| --- | --- | --- |
| What does the code on main do? | Yes | The repo |
| Which commit is running in production? | No | Version tag, error tracker release, orchestrator |
| Is this flag on for this customer? | No | The flag tool |
| Did someone change a timeout by hand? | No | Config repo or cloud audit log |
| Why was this changed? | Partly | PRs, review threads, Slack, tickets |


**A version tag** is a label your services attach to their telemetry naming the build they run. Set it to the git commit SHA. Then "what is running" and "what the repo says" share one key, and a tool that reads both can compare them.

## What Unblocked reads on the deployed side

Unblocked's docs list where the gap stays open. Unblocked "syncs incidents from Datadog every 15 minutes". Logs, metrics, monitors, events, hosts, APM spans and RUM events are "queried directly from Datadog at the time you ask a question" ([Unblocked Datadog docs](https://docs.getunblocked.com/data-sources/datadog.md)). From Sentry, it syncs issues from the projects you pick every 15 minutes ([Unblocked Sentry docs](https://docs.getunblocked.com/data-sources/sentry.md)). The CI integrations, such as GitHub Actions, analyze failed builds and post a report to the pull request.

For flags, the one built-in source is PostHog: Unblocked syncs feature flags from the PostHog projects you select ([Unblocked PostHog docs](https://docs.getunblocked.com/data-sources/posthog.md)). The data sources list has no LaunchDarkly, Kubernetes or deploy tracker ([Unblocked data sources](https://docs.getunblocked.com/configuring-data-sources.md)). For those, you can connect a tool's MCP server over public HTTPS as a Custom MCP, and Unblocked uses its read-only tools ([Unblocked Custom MCP docs](https://docs.getunblocked.com/data-sources/custom-mcp.md)). Our [PagerDuty MCP guide](https://getunblocked.com/blog/pagerduty-mcp/) shows that pattern.

The live version is visible only if you tag versions. Unblocked can count APM spans and break the counts down by facets such as app version, though it returns counts, not individual traces ([Unblocked Datadog docs](https://docs.getunblocked.com/data-sources/datadog.md)). So if your services send a version tag to Datadog, Unblocked can tell you which versions are serving traffic. If not, or if the answer lives only in `kubectl`, check there. [Inside the Unblocked context engine](https://getunblocked.com/blog/inside-the-unblocked-context-engine/) explains how it weighs code against other sources.

## How to ask so the answer checks both sides

The wording of the question decides which sources the tool consults. "Why does checkout time out?" invites an answer from the code alone. A better version names the gap: ask which version of checkout is serving errors right now, then which merged PRs since that version touch the timeout. That makes the tool find the live version first.

In a made-up case, an agent reads main and sees a 10-second timeout. Your services tag versions, and Datadog span counts by version show production serving a build from two days ago. The PR that raised the timeout from 2 seconds merged yesterday. The bug is real in production and already fixed in the repo, so the fix is a deploy. A repo-only tool would have said the code looks fine.

Once you know the live version, [mapping the blast radius](https://getunblocked.com/blog/map-blast-radius-incidents-ai-tools/) shows what else that build touches. For the first 15 minutes of an outage, see [finding what got deployed and what code changed](https://getunblocked.com/answers/find-recent-deploys-and-code-changes-during-outage/). For how incident tools and a context engine split the work, see [AI incident investigation that knows your code](https://getunblocked.com/answers/ai-incident-investigation-that-knows-your-code/). And for agents trusting a source that has drifted, see [tools that stop agents acting on stale documentation](https://getunblocked.com/blog/stop-agents-using-stale-documentation/).

## Read more

- [How to Map Blast Radius During an Incident: 5 Tool Classes Compared](https://getunblocked.com/blog/map-blast-radius-incidents-ai-tools/)
- [Tools That Stop AI Agents From Acting on Stale Documentation (2026)](https://getunblocked.com/blog/stop-agents-using-stale-documentation/)

## Related answers

- [What enterprise search works for a 50 to 300 person engineering team when Glean feels like too much?](https://getunblocked.com/answers/enterprise-search-mid-size-engineering-team/)
- [How do we cut ramp-up time for engineers joining a large existing codebase?](https://getunblocked.com/answers/cut-ramp-up-time-large-codebase/)
- [How do I give Claude Code docs for our internal SDK that isn't on the public internet?](https://getunblocked.com/answers/claude-code-docs-internal-sdk/)
- [Which AI assistants answer engineering questions in Slack with links to their sources?](https://getunblocked.com/answers/ai-assistant-engineering-questions-slack-sources/)
