﻿---
title: "Bitbucket Agentic Pipelines Codex"
filename: "bitbucket-pipelines.yml"
canonical: /templates/bitbucket-agentic-codex/
---

# Bitbucket Agentic Pipelines Codex

流水线中设置 provider: codex，并通过 config.path 指定配置。生成的 .codex/config.toml 由 Pipelines 管理。

```
image: atlassian/default-image:5

definitions:
  agents:
    my-agent:
      prompt: "Explain this repository"
      provider: codex
      permissions:
        on-ask: allow
      config:
        path: .codex/atlassian-mcp.toml
        overrides:
          sandbox_mode: workspace-write
pipelines:
  default:
    - step:
        name: Codex agent
        auth:
          system:
            scopes:
              - read:pullrequest:bitbucket
        script:
          - agent: my-agent

# .codex/atlassian-mcp.toml（提交这份，不要提交生成的 .codex/config.toml）
# [mcp_servers.atlassian-mcp]
# url = "https://mcp.atlassian.com/v1/native/mcp"
# [mcp_servers.atlassian-mcp.env_http_headers]
# Authorization = "ATLASSIAN_MCP_AUTH"

```
