Skip to content

worktree add switches HTTPS to SSH, then --allow-unverified-freshness hangs indefinitely #1285

Description

@chubes4

Summary

workspace git pull and workspace worktree add resolve different transports for the same registered repository. Pull succeeds over the registered HTTPS remote; worktree add immediately fetches over SSH and fails. Using the documented --allow-unverified-freshness recovery then hangs indefinitely with no progress output — reproduced twice, including once with --verbose for more than 10 minutes.

Reproduction

Registered workspace:

$ studio wp datamachine-code workspace show homeboy
Remote: https://github.com/Extra-Chill/homeboy.git

Refresh succeeds:

$ studio wp datamachine-code workspace git pull homeboy --allow-primary-refresh
Success: Updating ...
Fast-forward

Immediate worktree allocation:

$ studio wp datamachine-code workspace worktree add homeboy \
    fix/13714-bounded-test-execution \
    --from=origin/main \
    --task-url=https://github.com/Extra-Chill/homeboy/issues/13714 \
    --purpose=agent_task_cook

Git fetch stderr:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

The command itself recommends the offline override. Both invocations below hung with zero output and created no worktree:

... workspace worktree add ... --allow-unverified-freshness
# externally terminated after 180 seconds

... workspace worktree add ... --allow-unverified-freshness --verbose
# externally terminated after 650 seconds

The intended path /Users/chubes/Developer/homeboy@fix-13714-bounded-test-execution does not exist after either timeout.

Impact

This blocks the mandatory managed-worktree path after a successful authoritative refresh. The operator is forced toward an unmanaged git worktree add precisely when DMC is supposed to own identity, capacity, cleanup, and finalization.

It also violates transport determinism: the recorded and proven HTTPS remote is not the remote the next lifecycle operation uses.

Expected

  • All operations for a registered repository resolve the same canonical remote/transport unless an explicit operation-level override is supplied.
  • A successful workspace git pull freshness proof is reusable by an immediately following worktree add from the exact proven ref.
  • --allow-unverified-freshness bypasses only freshness verification and proceeds to allocation; it never waits indefinitely.
  • Every lock/capacity/fetch phase emits progress under --verbose and has a bounded deadline with a typed failure naming the phase and owner.
  • A timed-out or interrupted allocation releases every lock/lease it acquired.

AI assistance

  • AI assistance: Yes
  • Tool(s): Claude Sonnet 4.6 via OpenCode
  • Used for: Reproduced the transport mismatch and two bounded hangs, verified no worktree was created, and drafted this report.

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