# Our coding agent only sees one repo. How do we give it context from the services it calls?


URL: https://getunblocked.com/answers/coding-agent-context-from-other-services/
Published: 2026-12-01T17:00:00Z
Updated: 2026-11-30T20:53:45Z
Author: Dennis Pilarinos
Categories: Context Engine, Engineering Insights

**Short answer:** Give the agent a way to ask about other repos instead of cloning them. With Unblocked, you connect your source control, PRs, tickets, docs and Slack once, and the coding agent calls context\_research over MCP to get a cited answer on another service's API contract, owners and past changes before it writes code.

---
Give the coding agent a way to ask about the services it calls, instead of trying to fit their repos into its workspace. With Unblocked, you connect your source control, pull requests, tickets, docs and Slack once. Then the agent in Claude Code, Cursor, GitHub Copilot, Codex or Windsurf calls Unblocked's `context_research` tool over MCP. It gets a cited answer about the other service: its API contract, who owns it, and what changed there recently. **Cross-service context** is everything a change in one repo depends on that lives in another: the contract, the owners, past decisions and recent pull requests. For example, before the agent changes how your checkout service calls the payments API, it can ask Unblocked how payments handles retries and whether anyone changed that behavior last quarter. Two lighter options, adding the other repo to the session and publishing contracts in a service catalog, cover part of this.

## What a coding agent misses when it only sees one repo

The calling code shows how your service uses another one. It does not show what the other service promises, who to ask, or what it is about to change. Some agents are scoped this way by design. GitHub's docs say that when Copilot runs on GitHub Actions, it "can only make changes in the repository specified when you start a task," and its GitHub MCP server "only provides access by default to context in the repository where the agent is working, such as issues and previous pull requests" ([GitHub Docs](https://docs.github.com/en/copilot/concepts/copilot-surfaces/copilot-on-github)).

Even inside one repo, agents are uneven at finding what matters. ContextBench is a February 2026 benchmark of 1,136 tasks from 66 repositories. Its research method compares each agent's trail with context that people marked by hand. It found that models "consistently favor recall over precision" and that there are "substantial gaps" between the context agents explore and the context they use ([arXiv 2602.05892](https://arxiv.org/abs/2602.05892)). Asking an agent to wander a second or third repo on its own is likely to widen that gap.

So the agent needs answers to four questions about each service it calls:

- What is the contract: endpoints, fields, error codes, timeouts?
- Who owns the service, and who should review a change that depends on it?
- What changed there recently, and is anything planned that affects us?
- Was the behavior we rely on a deliberate decision, or an accident?

## Add the other service's repo when you know which one it is

The simplest fix is to put the other repo in the session. Claude Code's `--add-dir` flag "gives Claude access to additional directories outside your main working directory." By default, it does not load the `CLAUDE.md` files in those directories. Set `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` if you want their rules too ([Claude Code memory docs](https://code.claude.com/docs/en/memory)). In the Cursor editor, version 3.2 (April 2026) lets one agent session target a workspace of several folders and make cross-repo changes ([Cursor changelog](https://cursor.com/changelog/04-24-26)).

This works for a small, known set, such as your service plus the one client library it wraps. It breaks down in three ways. You have to know which repos matter before you start. Each added repo is more code to read, and ContextBench suggests the agent will explore more of it than it uses. And a checkout holds code only, so the pull request that explains why payments retries three times stays out of view. Our post on [context engineering across hundreds of repos](https://getunblocked.com/blog/context-engineering-across-hundreds-of-repos/) walks through where this rung stops working.

## Publish contracts and owners where agents can read them

A service catalog answers the first two questions without a checkout. In Backstage, an API entity "describes an interface that can be exposed by a component," in formats such as OpenAPI, AsyncAPI, GraphQL or gRPC. Components then list `providesApis` and `consumesApis`, so the catalog knows which services call which APIs and which team owns each one ([Backstage descriptor format](https://backstage.io/docs/features/software-catalog/descriptor-format)).

Point the agent at the catalog through its API or an MCP server, and it can fetch the payments OpenAPI file and the owning team before it edits the caller. If you don't have a catalog yet, our answer on [generating a service catalog from code](https://getunblocked.com/answers/generate-service-catalog-from-code/) covers a starting point.

The limit is that a catalog records what and who. It rarely records why, and it is only as current as the last YAML edit. A field marked as optional in the spec may have been required in practice since an incident, and that fact lives in a pull request thread.

## Give coding agents the history of the services they call

**A context layer** is a shared service that indexes code, pull requests, tickets, docs and chat, and answers agents with cited sources. Unblocked is one. It indexes code and pull requests from the source code systems you connect, along with issues, docs and Slack or Teams messages ([Unblocked data sources](https://docs.getunblocked.com/data-sources/data-sources-overview.md)). Its `context_research` tool runs one query across them and returns a summary plus the specific pull requests, documents, issues and messages behind it ([Unblocked docs](https://docs.getunblocked.com/unblocked-mcp/mcp-context-research.md)). The agent doesn't need the payments repo on disk to learn that payments changed its idempotency key format. Our post on [how the Unblocked context engine ranks sources](https://getunblocked.com/blog/inside-the-unblocked-context-engine/) explains how it weighs code, recency and expertise.

**Plan review** is a check of an agent's drafted plan against existing code and team decisions before it writes code. In Unblocked, that is the `review_implementation_plan` tool, and the docs suggest `high` effort "for broad changes such as a migration spanning several services" ([Unblocked docs](https://docs.getunblocked.com/unblocked-mcp/mcp-review-implementation-plan.md)). One install script sets up each supported agent it finds on a machine ([Unblocked MCP docs](https://docs.getunblocked.com/unblocked-mcp/mcp-overview.md)). With Data Shield on, answers respect each source's permissions.

Zachary Goldberg, Engineering Manager, Lilt: "My agents know to use Unblocked first because it's faster than having them figure it out from the code alone. When I'm working on a Java service, I ask Unblocked what documentation exists, what the code says, what the service does — and it comes back with a succinct, clear answer. Individual MCPs are great when you already know what you're looking for. Unblocked is what you use when you need the full picture."

Separate GitHub, Jira and Slack connectors return raw results the agent has to stitch together, as our post on why [MCP connectors are not a context engine](https://getunblocked.com/blog/mcp-connectors-are-not-a-context-engine/) explains.

## A rule that makes the agent ask first

Add one line to the repo's `AGENTS.md` or `CLAUDE.md`, along these lines: "Before changing code that calls another service, ask Unblocked for that service's contract, owners and recent changes, and cite what you found in the pull request description."

Teams we work with add a second line for reviews: if a change alters a request or response shape, tag the owning team the research named. Start with the two or three services your repo calls most. Then read the next few pull requests the agent opens, and check whether it cited the other service's history or guessed.

## Read more

- [Context Engineering Across Hundreds of Repos: A Practical Ladder for Platform Teams](https://getunblocked.com/blog/context-engineering-across-hundreds-of-repos/)
- [Inside the Unblocked context engine: how we decide what your agent needs to know](https://getunblocked.com/blog/inside-the-unblocked-context-engine/)

## 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/)
