What is code context?
Code context is currently in open beta for GitHub users in Rovo Chat and Teamwork Graph (TWG) CLI, and rolling out to Bitbucket shortly.
The current experience may change before general availability.
Code context enables intelligent search across your connected source code repositories, directly within the Atlassian tools your team already uses. Whether you're navigating an unfamiliar codebase, investigating a bug, or asking a Rovo agent to help with a task, code context helps surface the right code faster.
What code context does
Code context combines two complementary search modes to give you more flexible, powerful code discovery.
| Lexical search | Semantic search |
|---|---|---|
How it works | Traditional keyword and string-matching search across your repositories. | Finds code inferred from meaning and conceptual intent, not just exact words. |
Use cases | Best when you know exactly what you're looking for, like a specific function name or string. | Ideal for cases when you’re after a concept, not a specific term that may not actually appear in the code. |
In Rovo Chat and the TWG CLI the underlying agent will automatically select the best search mode based on your query. Sometimes, it might combine lexical and semantic search.
How code context works
Code context is off by default. When it’s explicitly enabled by an organization admin, Atlassian connects to your repositories and builds a searchable index. Here's what happens:
Atlassian connects to your repositories via the Jira GitHub Connector or Bitbucket integration.
Files are chunked and converted to vector embeddings.
Code chunks and their embeddings are stored in a secure, isolated environment managed by Atlassian.
Repository events (pushes and branch updates) trigger incremental re-indexing of changed files so the index stays current.
Code context can be disabled at any time. If an organization admin disables code context, indexing stops immediately. All stored embeddings, indices, and code chunks are deleted.
Indexing is frequent, not instant. Recently pushed code may not immediately appear in search results.
Read more about how to enable code context for your site
What's indexed
For GitHub repositories, code is mirrored into Atlassian infrastructure before indexing. For Bitbucket repositories, code is indexed directly.
The following data is stored in a secure, isolated environment in the United States.
Data | Details |
|---|---|
Source code files | All files across all branches and tags in opted-in repositories (Bitbucket Cloud and GitHub Cloud supported). |
File metadata | File paths, names, repository identifiers, and branch and tag references. |
Code chunks | Files are broken into smaller chunks to improve search accuracy. |
Vector embeddings | Each chunk is transformed into a numerical representation that encodes its semantic meaning. Embeddings are non-human readable and aren't intended to be reversible into source code. |
Permissions and access
Code context is built to enforce permissions as a core principle, not an afterthought, and is especially designed to respect your Source Code Management (SCM) permissions. Code context doesn't grant users access beyond what their SCM permissions allow.
Users will see results only for repositories and branches they already have access to in the source SCM. Atlassian validates permissions at query time against the repository's permission endpoint.
If an organization admin enables code context for a repository, individual contributors cannot exclude their code from indexing. This matches how existing Bitbucket lexical search already works.
How your data is handled
The Teamwork Graph CLI augments Atlassian coding agents (via the Rovo CLI) or third-party products (like Claude Code or Codex).
If you use code context via the Teamwork Graph CLI with a third-party agent, your source code will be sent to those products and governed by their terms, which may expose proprietary code and IP.
You’re responsible for assessing the third-party providers security and suitability, for managing all their associated costs, API capacity, and agent actions.
Your code is not used to train Atlassian's AI models.
To generate the vector representations of your code, Atlassian will use a code-optimised embedding model. If you’re using code context through Rovo Chat, relevant code snippets may be passed as context to a large language model (LLM) to generate a response.
This is consistent with how AI experiences at Atlassian work more broadly.
Read more about Rovo Chat use cases and data use
Things to keep in mind
Search results are scoped to what the querying user can already access in your SCM. Make sure repository permissions in Bitbucket or GitHub are correctly configured so code context can reflect those boundaries accurately.
When using Rovo Chat and the Teamwork Graph CLI with code context, the AI response is probabilistic. Always verify AI-generated answers before acting on them, particularly in critical situations like incident response or security decisions.
Semantic search is a discovery tool
Semantic search helps you explore and understand code, but it's not a replacement for dedicated security or compliance scanning tools. We suggest you use purpose-built tooling for auditing and vulnerability detection.
Keep in mind — semantic search is influenced by code comments and documentation strings. Accurate comments improve the relevance of results, so good code review practices benefit your search experience, too.
Known limitations
Limitation | Details |
|---|---|
Not exact-match search | Semantic search returns results ranked by conceptual similarity, not literal string matching. Results won't always contain your exact query terms. Use lexical search when you need to find a specific function name or string. |
Results may be slightly delayed | Recently pushed code may not appear in results immediately while the indexing refreshes. |
Language and query variance | The model performs best on popular languages (Python, Java, TypeScript) and targeted queries. It may underperform on niche languages, non-English comments, or highly ambiguous queries. |
No confidence signal | The system doesn't currently indicate how confident it is in a result's relevance. Apply your own judgement rather than treating top-ranked results as definitive. |
SCM outages affect freshness | If a connected SCM (GitHub or Bitbucket) experiences an outage, new code changes may not be indexed until the connection is restored. |
Supported SCMs | Bitbucket Cloud and GitHub Cloud are supported. GitLab and others are planned for future releases. |
Unavailable for HIPAA customers | Code context is not currently HIPAA-compliant. This feature is not available to HIPAA enabled sites. |
We want to hear how code context is working for your team. Share feedback and report issues directly through the Rovo Chat, or this form if you’re using the TWG CLI
Was this helpful?