A developer has built a tool that lets AI coding agents running on a remote machine use commands on his laptop, including logged-in tools like the GitHub CLI, without ever giving the agents his login credentials. The tool, called lend, sends every request to the laptop, where it is checked against a local policy and must be approved before anything runs.
The developer runs several agents at once, including Claude Code and Codex, on virtual machines he can discard. His laptop keeps the things he cares most about: his SSH keys, his 1Password vault and command-line tools that are logged in as him. The agents need some of those tools to work. They monitor continuous integration with the GitHub CLI, call APIs using tokens stored in 1Password and connect to other hosts over SSH.
He said he disliked the two usual options. The first is copying credentials onto the virtual machine, where any process on that machine could read them for as long as the token stayed valid. The second is forwarding his SSH agent with the forwarding flag. That keeps private keys on the laptop, but the remote machine can use every key in the agent without asking and without a record of what was signed. It also covers only SSH keys.
How does Lend keep login credentials on the laptop?
Lend is designed to avoid both problems. It sits in front of an existing SSH agent, and the developer forwards its socket in place of the real one. SSH and Git keep working as usual. When an agent asks to run a command, the request travels over the socket, and the command runs on the laptop with the developer's own login. The token never leaves the laptop.
What can a remote AI agent run through Lend?
The policy lives on the laptop and lists what the remote machine may request. Anything not listed is denied. In the developer's example, only the GitHub CLI and one signing key are allowed, and both require approval. A rule can limit approval to certain subcommands, such as pull request viewing. Approval can be set to use Touch ID directly in the request dialog, so the user reads the request and touches once to allow it.
When the agent sends a request, the dialog shows the full path to the program, every argument, the folder where it will run on the laptop, the stated reason and details the remote process provided about itself. The developer notes that the remote details cannot be verified and are there only to help the user decide. They cannot change what the policy allows. Once approved, the command's output, error messages and exit code stream back to the agent.
Some tools need a secret passed in as an environment variable. For those cases, a rule can read a value from 1Password and give it to the approved command. The remote machine cannot choose which variables get set or which references get read, and the values do not appear in prompts or history. The developer warns that this protection fails if the approved command prints its environment, and that approving a shell, an interpreter or the 1Password command itself would hand over the secrets.
Lend also offers time-limited leases, such as five minutes or three uses, which apply only to the exact command and arguments approved and end when the session closes or the screen locks. A command called status shows what is connected, waiting or running, and a pause command cancels all activity and blocks new requests until resumed. A history log records what ran and how it was approved, but leaves out arguments, output and secrets unless the user opts in.
The tool can also route general permission prompts from agents, such as requests to run a shell command, edit a file or fetch a URL, to the same approval dialog on the laptop. The laptop policy controls which topics are allowed to ask. If the laptop cannot be reached, the agent falls back to asking in its own interface.
What are the risks of letting AI agents run laptop commands?
The developer is clear about the limits. An approved command runs as the user and can access local files, and lend does not sandbox it. Anyone who can reach the forwarded socket on the remote machine, including the root user, can make requests while a session is open, though the policy still limits what they can ask for and each request still needs approval. The tool is early-stage, does not allocate a terminal, so interactive programs do not work through it, and biometric approval works only on macOS. On Linux, approval appears as a Zenity dialog or a terminal prompt.
Lend is available through Homebrew or an install script, and the project's documentation covers policies, approval and the MCP server integration. The developer says lend builds on an existing approach used by other tools, adding per-request policy, local approval and key filtering. Users can check their setup with a built-in diagnostic command on both the laptop and the remote host.
Dieser Artikel wurde mit Unterstützung von KI verfasst.
News Factory APP - agentische News für besseres SEO & AEO.
