{
  "slug": "azd-exec-runs-programs-with-azd-environment-context-789118f9b2b2",
  "title": "azd exec runs programs with azd environment context",
  "tools": [
    "azd"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-16T03:36:08.000Z",
  "announced_at": "2026-05-16T03:36:08.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a program or script needs the current azd environment context, run it with `azd exec`; the documented syntax supplies azd environment variables to the child process. The 1.25.1 release note also says this includes Key Vault secret resolution.",
    "examples": [
      "azd exec <program> [args...]",
      "azd exec ./<script>"
    ],
    "gotchas": [
      "Version: 1.25.1",
      "command (required): Program or script to execute.",
      "args...: Arguments passed to the command; multiple arguments use direct process execution without shell wrapping.",
      "-e, --environment <environment>: Name of the environment to use.",
      "-i, --interactive: Connect stdin for interactive mode.",
      "-s, --shell <shell>: Select shell: bash, sh, zsh, pwsh, powershell, or cmd; auto-detected when omitted.",
      "-C, --cwd <directory>: Set the current working directory.",
      "Cross-platform command and script execution engine.",
      "Docs conflict: The current reference page was updated after azd 1.25.1 and documents command parsing and flags that may differ from that release. Its synopsis describes access to azd environment variables; Key Vault secret resolution is stated in the 1.25.1 release note, not this synopsis."
    ]
  },
  "why_it_matters": "Run a program or script that needs the current azd environment variables or Key Vault secrets.",
  "sources": [
    "https://github.com/Azure/azure-dev/releases/tag/azure-dev-cli_1.25.1",
    "https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/reference"
  ],
  "rank": 0.96046,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-8e2be2dd9bb6ee44-0:gate",
    "evidence_hash": "8129d8d106661039bd01a7137f1a768048bf763e12141da14c1ef96b24db3510"
  },
  "review": {
    "draft_hash": "382e9266da2cdfa61a3b8ab0c2975f11c5b21088f1324459c1e67ae924007698",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.76 (>= 0.6 needed)."
  }
}
