Skip to content

bug: PR URL never written to session metadata — dashboard always shows 'No PR associated' #80

Closed

Description

@sujayjayjay

Problem

When an agent (Claude Code) runs gh pr create and opens a PR, nothing writes the PR URL back to the session metadata file. The dashboard shows "No PR associated with this session" for all sessions, even those with open PRs.

Root cause

The metadata file format supports a pr= field:

status=pr_open
pr=https://github.com/org/repo/pull/42

But there is no mechanism that:

  • Detects when a branch gets a PR on GitHub
  • Writes pr=<url> into the session metadata
  • Updates status to pr_open

Claude Code agents don't know about AO's metadata format and won't write to it themselves.

Fix

As part of the status-sync loop (see related issue), periodically run:

gh pr list --head <branch> --repo <repo> --json number,url,state

If a PR exists, call updateMetadata(dataDir, sessionId, { pr: url, status: "pr_open" }).

This would also unlock the CI/review enrichment in the dashboard (which already has the code to show CI status and review state — it just never gets a PR URL to work with).

Activity

  1. harshitsinghbhandari commented on Jun 24, 2026

    @harshitsinghbhandari
    Member

    Closing this as part of the migration cleanup for the ground-up rewrite of
    Agent Orchestrator.

    This item was opened more than a month before the migration batch and the
    codebase has been replaced, so this thread no longer maps cleanly onto the
    current source tree.

    If something here still needs tracking, please reopen this item or open a fresh
    one against the new tree. Thank you for contributing.

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

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