Skip to content

fix(reverse): give agents the sign-in reason to say, and catch stale CLIs that know reverse - #7488

Merged
WaterrrForever merged 3 commits into
mainfrom
fix/rav-signin-why-and-stale-cli
Nov 10, 2026
Merged

WaterrrForever merged 3 commits into
mainfrom
fix/rav-signin-why-and-stale-cli

Conversation

@WaterrrForever

@WaterrrForever WaterrrForever commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What

How a reverse run opens when the person is signed out, and when an old CLI install is in the way.

1. Agents asked for sign-in without saying why. The signed-out next used to tell the agent to "say why HeyGen makes the best remake", and agents mostly skipped it. Now:

  • next carries a sentence the agent can say as is: HeyGen re-shoots anyone on screen, and the HyperFrames account is the HeyGen account.
  • Every message that gives the sign-in link starts with that sentence.

2. Remote terminals lost the reason in a two-step sign-in. The agent tried a browser login, which a remote terminal refuses. It then sent the device code as a bare follow-up, so the reason was lost. Now:

  • reverse start uses the same check as auth login (moved to utils/attendedTerminal.ts) to tell when no browser can open.
  • There, login_command is auth login --device, and next asks for one message with the reason, link and code, sent before the agent waits.
  • Agents say they are waiting for sign-in instead of quoting the skill.

3. Old global installs stay frozen under agents. When an agent runs the CLI, it gets no update notice and no auto-install, and a global install wins over plain npx hyperframes.

  • Skill: treats a CLI as an old install when any of these holds:

    • it doesn't know reverse start;
    • reverse start reports _meta.updateAvailable: true;
    • or it is signed out with no reverse.next. This catches the cold-cache case Rames raised.

    It then resolves @latest once and pins the whole run to that release, as npx -y hyperframes@<version>.

  • CLI: new installerDetection.shadowingInstall. When this copy runs through npx, it finds the first hyperframes on PATH outside the npx cache. If that one is older, it returns its version and the command that updates it. reverse start then opens next with a line the agent can say: the install is out of date, and here is how to update it. Skill wording alone didn't get agents to say this. Across six runs with three phrasings, Claude never said it. With the CLI-provided line, it said it word for word.

Verified

  • Tests (vitest) for commands/reverse/, commands/auth/, utils/installerDetection, updateCheck and autoUpdate all pass. New coverage:
    • the remote-terminal route;
    • the reason coming before the login instruction;
    • shadowing detection: older global → line; same version, no global, or not npx → nothing;
    • the line on both the signed-out and signed-in outputs.
  • Comment ratchet, comment citations, fallow and typecheck all pass.
  • Live agent runs on a fake remote terminal, signed out:
Agent Setup Reason first Link + code in one message Old install handled
Claude skill, English (×2) and Chinese ✅ ✅ –
Claude CLI only, no reverse skill ✅ ✅ –
Claude old 0.9.8 global, warm and cold update cache ✅ ✅ switched and pinned the release
Claude npx copy shadowed by old global (this build) ✅ ✅ ✅ said the update line word for word
Codex (exec and interactive) skill ✅ ✅ –
Codex old global / shadowed ✅ ✅ switched; said it switched, without the update command

Known host behavior

Codex sometimes ends its message with a clickable link to the skill file and a quote from it. Its base instructions ask for clickable links whenever it references a local file. The skill and next both say not to, and some Codex runs are clean.

…CLIs that know reverse

- `reverse start`'s signed-out `next` now carries a sentence the agent can say as is
  (why HeyGen, and that the HyperFrames account is the HeyGen account), asks for it at
  the start of the sign-in message, and on remote terminals has the agent send the
  device link and code before it waits.
- references/start.md: same ordering, an example that fits both login routes, and no
  links to or quotes from the instructions themselves.
- An old global install that knows `reverse start` but predates `next` was never caught:
  agent runs get no update notice and no auto-install, so it stays frozen. The skill now
  also treats `_meta.updateAvailable: true` from `reverse start` as an old install and
  runs the rest with `npx -y hyperframes@latest`; every CLI that knows `reverse start`
  already reports that field.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 918e0c4aa72adc160e3456871899ca6692d4df9e.

No new blocker found. The OAuth implementation is unchanged: the device challenge is already printed before polling (src/commands/auth/login.ts, src/auth/oauth.ts). The new instructions change the agent's sequencing so the person receives the link/code before the agent waits.

The metadata contract predates reverse start: published 0.9.6 (the first release containing the command), 0.9.10 and 0.9.28 all expose _meta.updateAvailable. Unsupported commands retain the existing fallback. Missing metadata has no additional fallback, and a cold/offline registry cache can report false; this improves stale-install coverage rather than guaranteeing detection on every first invocation.

Execution-policy tradeoff: skills/reverse-any-video/references/start.md:18-21 broadens the existing npx -y hyperframes@latest fallback to recognized stale CLIs. This downloads/runs the moving npm release without a prompt, rather than applying the background updater's unattended/breaking-version restrictions (npm exec behavior). It does not update the global installation. The mechanism already existed for unsupported CLIs; plugin installs remain explicitly excluded and pinned. Pinning the resolved version for the rest of a run would be a useful reproducibility follow-up, not a blocker here.

Validation: 105 local auth/update-metadata tests passed; the reverse suite could not collect with the available older dependency exports. Exact-head hosted job 129736020616 confirms reverse/start's 23 tests and updateCheck's 75 pass. Skill manifest check passes. Independent adversarial source pass found no additional defect. No claim that every agent follows the revised prose reliably.

Need: yes · Size: ok · Reuse: existing metadata, device flow and standalone fallback · Simpler: already minimal · Structure: fine (checked login/update/plugin consumers; no split)
Risk: low - focused guidance change using existing execution mechanisms, with the broader latest-version policy explicit above.

Verdict: APPROVE
Reasoning: The instructions fix the remote sign-in ordering and use an established metadata contract; remaining cache and agent-compliance limits are understood.

Reviewed by hf-review.

…n in every link message

- `reverse start` now knows when no browser can open (the check `auth login` uses, moved
  to attendedTerminal): `login_command` is `auth login --device` and `next` asks for one
  message with the reason, the link and the code. The two-step route (a refused browser
  login, then a bare follow-up with the code) is where the reason got lost.
- Every message that gives the sign-in link starts with the reason; agents say they are
  waiting rather than quoting the skill, and give no file paths.
- The out-of-date line for an old global install goes in the next message to the person.
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 96 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (2)

  • seqfastkeys-none-px-r0-root-z100: tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.07, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true
  • seqab-none-pct-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

…the run's release

- installerDetection: `shadowingInstall` finds the older global `hyperframes` that a plain
  `npx hyperframes` runs instead of this npx copy (first on PATH outside the npx cache), with
  the command that moves it. `detectInstaller` takes the entry to classify.
- `reverse start` run through npx opens `next` with that line as words to say, signed in or
  not. Skill prose alone did not get agents to tell the person.
- Skill: a signed-out `reverse start` with no `reverse.next` is also an old install, which
  covers a cold update cache; the run pins the release `@latest` resolved to.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 2544597632b306c57f20121280df8abe4c584c71; re-reviewed the delta from 918e0c4a.

The earlier follow-ups are addressed for the legacy no-reverse.next case: it no longer depends on a warm update cache, and the skill resolves the release once before using an exact version for subsequent commands. Published 0.9.8 lacks reverse.next. The shared remote/headless predicate and its helper are byte-identical to the prior login implementation; reverse now selects the device route directly. The new shadow probe reads realpaths/manifests only and does not execute binaries found on PATH. Plugin runs remain excluded.

Nit: packages/cli/src/utils/installerDetection.ts:351-352: a project-local node_modules/.bin/hyperframes also matches this probe, but detectInstaller returns skip, so the fallback recommends npm install -g hyperframes@latest. I reproduced {kind:"skip", shadow:{version:"0.9.8", updateCommand:"npm install -g hyperframes@latest"}} with a real local-package symlink. That global command leaves the shadowing project dependency unchanged. Suppress this notice for non-global/unknown installer kinds, or classify the local install and use the existing project-aware update command. This is nonblocking because the explicit version still carries the run correctly.

Validation: 178 tests passed across installerDetection, attendedTerminal, auth/login, updateCheck and autoUpdate; manifest check passed. The local reverse suite could not collect because the borrowed dependency set lacks recast, so I am not claiming its new cases passed locally. Independent adversarial source pass found no blocker. One-time latest resolution still trusts the npm release initially; pinning removes later version drift, not that trust assumption. No live Claude/Codex replay by me.

Need: yes · Size: ok · Reuse: shared terminal predicate and installer classifier · Simpler: suppress the unknown-installer fallback above · Structure: fine (checked login and update consumers; no split)
Risk: low - preserves auth detection and adds a read-only installation probe.

Verdict: APPROVE
Reasoning: The new auth routing and version pinning hold up; the project-local update suggestion is a small follow-up.

Reviewed by hf-review.

@WaterrrForever
WaterrrForever added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 007664e Nov 10, 2026
131 checks passed
@WaterrrForever
WaterrrForever deleted the fix/rav-signin-why-and-stale-cli branch November 10, 2026 11:44
@miguel-heygen miguel-heygen mentioned this pull request Nov 10, 2026
3 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants