# Runtime transcript: pingdotgg/t3code#33407 (watch_pull_request vs. a reused PR number)

Setup (synthetic scratch data on gitlab.com; same procedure on both sides):
- Project A holds MR !1, **merged**. Project B holds MR !1, **open** (head cf4df74fe2).
- Each side: `T3CODE_DEV_SEED=0 vp run dev:server` (fresh database), `t3 project add <clone of owner/t3-issue-33407>`,
  `t3 thread start ... --provider claudeAgent` (real agent turn) asking it to call `link_pull_request` for
  `https://gitlab.com/<owner>/t3-issue-33407/-/merge_requests/1` while A sits at that path.
- PR sync stores the link as `state: merged`.
- "Recreate" the repository: rename A away, rename B to `<owner>/t3-issue-33407`, so !1 at the same host/repository/number is now open.
- `t3 thread send ... ` asking the agent to call `watch_pull_request` {repository: <owner>/t3-issue-33407, host: gitlab.com, number: 1} once.

## Before: main @ b8c2cfad6b

```
link_pull_request -> {"host":"gitlab.com","repository":"<owner>/t3-issue-33407","number":1,...,"alreadyLinked":false}
stored link       -> state: merged
host after swap   -> !1 opened "New repo's MR one (open)"
watch_pull_request -> The pull request is merged, so there is nothing to watch.
stored link 80 s later (after another sync sweep) -> state: merged   (never re-read)
```

## After: fix/issue-33407 @ 768ee13b35

```
link_pull_request -> {"host":"gitlab.com","repository":"<owner>/t3-issue-33407","number":1,...,"alreadyLinked":false}
stored link       -> state: merged
host after swap   -> !1 opened "New repo's MR one (open)"
watch_pull_request -> {"host":"gitlab.com","repository":"<owner>/t3-issue-33407","number":1,...,"watching":true,"wasWatching":false}
stored link       -> state: open, title "New repo's MR one (open)", mergedAt: null
watch (60 s later) -> active, startedAt 15:25:11Z, headSha cf4df74fe2 (the open MR's head)
```
