Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Proxy leases: without --session, parallel agents pick up each other's session after open

Offen
#3,931 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript
Bereich
backend, cli

Rechercherichtung

Start by tracing session creation and loading in connection.js (Ae()) and cli.js (Zt/Kt), then inspect the code that writes remote-connections/<session>.json and .active-session.json. Reproduce with two parallel agents opening proxy leases and running snapshot -i without --session. Done when each agent's commands use its own lease reliably, with a clear error if an explicit session is required.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

With a proxy lease provider (simlock), commands after open only work when every one passes --session <id>, if several agents run on the same machine.

Seen with agent-device 0.21.28 through a simlock gateway, two agents in parallel. After open, snapshot -i without --session failed with one of:

  • No active proxy device lease for this session; run open first.
  • refused: lease <id> is not one of yours on this gateway (from simlock: the lease id sent belongs to the other agent's token)

A single agent alone does not show it.

Cause, from the 0.21.28 dist:

  • Without --session, connect/open makes up a random session name, adc-<32 hex> (connection.js, Ae()).
  • Each save writes <stateDir>/remote-connections/<session>.json and points the machine-wide <stateDir>/remote-connections/.active-session.json at it.
  • A later command without --session reads the default session file. That file does not exist, so it falls back to .active-session.json (cli.js, Zt/Kt; allowActiveFallback is true when --session is not given).

So the active session is "whoever saved last on this machine". With two agents, agent A's snapshot picks up agent B's session (B's lease → simlock refuses it), or a session that has no lease (→ "No active proxy device lease"). On this machine .active-session.json currently names a session whose file is already gone.

Possible fixes, in agent-device:

  1. Derive the default session from something per-agent (e.g. AGENT_DEVICE_SESSION, or an agent session id such as CLAUDE_CODE_SESSION_ID / CODEX_SESSION_ID) instead of a random name plus a machine-wide pointer.
  2. Or have open print the session it made and refuse to fall back to the machine-wide pointer for a proxy lease, with an error that says to pass --session.

Workaround today: set AGENT_DEVICE_SESSION per agent, or pass --session on every command.

Written by an agent.

Vorherrschende Sprache
TypeScript
Sterne
5.1k
Forks
339
Ø Merge
12 Std. 50 Min.
Gemergte PRs (30 T.)
632

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstack/agent-device

Alle Issues in callstack/agent-device

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.