Skip to content

Workflow hydration fails when using non-main branch #1536

@quay-devel

Description

@quay-devel

Summary

When creating a session with a workflow that lives on a non-main branch (e.g., a PR branch), the workflow files are not hydrated into the session workspace. The working directory is created but remains empty.

Steps to Reproduce

  1. Have a workflow defined on a PR branch (not merged to main)
    • Example: quay/ai-helpers repo, branch konflux-build-triage-workflow, path workflows/konflux-build-triage (PR #13)
  2. Create a session using that workflow, specifying the branch — either via the chat dropdown UI or via acp_create_session with workflow_branch set to the PR branch
  3. Observe that the workflow directory in the session workspace is empty (no CLAUDE.md, no scripts, no .ambient/ambient.json)

Expected Behavior

The workflow files from the specified branch should be cloned and hydrated into the session workspace, regardless of whether the branch is main or a feature/PR branch.

Actual Behavior

  • The working directory is created (e.g., /workspace/workflows/ai-helpers/) but is completely empty
  • The SessionStart hook never fires (since .claude/settings.json doesn't exist)
  • The agent starts with no instructions, no scripts, and no tools
  • Both the UI dropdown flow and acp_create_session API appear to have the same issue

Evidence

Session created via UI dropdown:

$ ls -la /workspace/workflows/ai-helpers/
total 0
drwxr-sr-x. 2 1001730000 1001730000  6 May  8 16:44 .
drwxr-sr-x. 3 1001730000 1001730000 24 May  8 16:44 ..

Session created via acp_create_session API (with explicit workflow_branch: "konflux-build-triage-workflow"):

  • Session reported as Running with agentStatus: idle, 0 messages after ~9 minutes — consistent with failed hydration

Environment

  • Workflow repo: https://github.com/quay/ai-helpers.git
  • Branch: konflux-build-triage-workflow
  • Workflow path: workflows/konflux-build-triage
  • Session date: 2026-05-08

Metadata

Metadata

Assignees

No one assigned

    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