Skip to content

Azure Devops Pipeline #10895

Closed as not planned
Closed as not planned

Description

@sschuetz2bit

Question

We are currently trying to get opencode to run in a Azure Devops Pipeline:

`trigger: none

pr:
branches:
include:
- "*"

pool:
vmImage: ubuntu-latest

steps:

  • checkout: self
    fetchDepth: 0
    persistCredentials: true

  • bash: |
    set -euo pipefail
    curl -fsSL https://opencode.ai/install | bash
    OPENCODE="$HOME/.opencode/bin/opencode"
    echo "##vso[task.prependpath]$(dirname "$OPENCODE")"
    "$OPENCODE" --version
    displayName: "Install OpenCode"

  • bash: |
    opencode run -m "$OPENCODE_MODEL" -- "Say hello"
    displayName: "Generate PR Review"
    env:
    AZURE_RESOURCE_NAME: $(AZURE_RESOURCE_NAME)
    AZURE_API_KEY: $(AZURE_API_KEY)
    OPENCODE_MODEL: "azure/gpt-5.1-codex-mini"
    `

However opencode just gets stuck, does not log anything nor does it run.

The api key, model and resource_name are correct. when trying it locally it runs.

here is the log output:
`2026-01-27T20:03:46.3522991Z ##[section]Starting: Install OpenCode
2026-01-27T20:03:46.3531769Z ==============================================================================
2026-01-27T20:03:46.3531953Z Task : Bash
2026-01-27T20:03:46.3532054Z Description : Run a Bash script on macOS, Linux, or Windows
2026-01-27T20:03:46.3532186Z Version : 3.259.0
2026-01-27T20:03:46.3532295Z Author : Microsoft Corporation
2026-01-27T20:03:46.3532410Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2026-01-27T20:03:46.3532558Z ==============================================================================
2026-01-27T20:03:46.5980283Z Generating script.
2026-01-27T20:03:46.5992105Z ========================== Starting Command Output ===========================
2026-01-27T20:03:46.6000280Z [command]/usr/bin/bash /home/vsts/work/_temp/46883133-f9d6-4cb8-9424-84b62270df7d.sh
2026-01-27T20:03:47.1910981Z �[0m
2026-01-27T20:03:47.1912107Z �[0;2mInstalling �[0mopencode �[0;2mversion: �[0m1.1.36�[0m
2026-01-27T20:03:47.5704686Z #=#=#
2026-01-27T20:03:47.6741685Z ##O#-#
2026-01-27T20:03:47.6743029Z
2026-01-27T20:03:47.7757716Z ##################################### 52.3%
2026-01-27T20:03:47.8750552Z ############################################################ 83.9%
2026-01-27T20:03:47.9531172Z ############################################################## 86.3%
2026-01-27T20:03:47.9532683Z ######################################################################## 100.0%
2026-01-27T20:03:49.2086828Z �[0m�[0;2mSuccessfully added �[0mopencode �[0;2mto $PATH in �[0m/home/vsts/.bashrc�[0m
2026-01-27T20:03:49.2088256Z
2026-01-27T20:03:49.2089658Z �[0;2m �[0m ▄
2026-01-27T20:03:49.2100277Z �[0;2m█▀▀█ █▀▀█ █▀▀█ █▀▀▄ �[0m█▀▀▀ █▀▀█ █▀▀█ █▀▀█
2026-01-27T20:03:49.2102162Z �[0;2m█░░█ █░░█ █▀▀▀ █░░█ �[0m█░░░ █░░█ █░░█ █▀▀▀
2026-01-27T20:03:49.2103757Z �[0;2m▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ �[0m▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀
2026-01-27T20:03:49.2104598Z
2026-01-27T20:03:49.2105155Z
2026-01-27T20:03:49.2106380Z �[0;2mOpenCode includes free models, to start:�[0m
2026-01-27T20:03:49.2106790Z
2026-01-27T20:03:49.2107602Z cd �[0;2m# Open directory�[0m
2026-01-27T20:03:49.2108481Z opencode �[0;2m# Run command�[0m
2026-01-27T20:03:49.2108818Z
2026-01-27T20:03:49.2109710Z �[0;2mFor more information visit �[0mhttps://opencode.ai/docs
2026-01-27T20:03:49.2110139Z
2026-01-27T20:03:49.2110469Z
2026-01-27T20:03:49.7985938Z INFO 2026-01-27T20:03:49 +124ms service=models.dev file={} refreshing
2026-01-27T20:03:50.0606040Z 1.1.36
2026-01-27T20:03:50.0787579Z
2026-01-27T20:03:50.0857711Z ##[section]Finishing: Install OpenCode

2026-01-27T20:14:25.4946801Z ##[section]Starting: Generate PR Review
2026-01-27T20:14:25.4953921Z ==============================================================================
2026-01-27T20:14:25.4954051Z Task : Bash
2026-01-27T20:14:25.4954124Z Description : Run a Bash script on macOS, Linux, or Windows
2026-01-27T20:14:25.4954217Z Version : 3.259.0
2026-01-27T20:14:25.4954294Z Author : Microsoft Corporation
2026-01-27T20:14:25.4954374Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2026-01-27T20:14:25.4954478Z ==============================================================================
2026-01-27T20:14:25.8327001Z Generating script.
2026-01-27T20:14:25.8360113Z Script contents:
2026-01-27T20:14:25.8360806Z opencode run -m "$OPENCODE_MODEL" "Say hello"
2026-01-27T20:14:25.8361659Z ========================== Starting Command Output ===========================
2026-01-27T20:14:25.8362703Z [command]/usr/bin/bash /home/vsts/work/_temp/de9a09a9-d74a-4552-a743-4dabca2bfc76.sh
2026-01-27T20:14:26.4440769Z INFO 2026-01-27T20:14:26 +121ms service=models.dev file={} refreshing
`

how can i debug it?
It runs perfectly fine on my machine in bash

Activity

  1. github-actions commented on Jan 27, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. sschuetz2bit commented on Jan 29, 2026

    @sschuetz2bit
    Author

    i was able to get it running by using:
    script -q -c 'opencode run -m $OPENCODE_MODEL "say hello"' /dev/null

  3. Dulani commented on Feb 26, 2026

    @Dulani

    Quick thought: have you tried running with OPENCODE_DISABLE_MODELS_FETCH=1? We hit a hang during the models.dev refresh in a restricted environment, and this env var bypassed the fetch and let opencode run proceed.

  4. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions