Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#3,931 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
backend, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
5.1k
Fork
339
Merge trung bình
12 giờ 22 phút
Pull request đã merge (30 ngày)
701

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.