Antonio Mika published Running coding agents without handing them my credentials on November 13, 2026, describing lend—a proxy that sits in front of your laptop SSH agent so Claude Code and Codex can run on disposable VMs while gh, 1Password, and SSH signing stay on the machine you trust. If you already forward SSH_AUTH_SOCK with ssh -A, you know the pain: keys never leave the laptop, but every process on the VM can ask the agent to sign without a prompt. lend keeps the forwarding model but adds deny-by-default policy, per-request approval, and an MCP tool so agents request laptop commands instead of copying tokens into ~/.config/gh.
Action today: treat remote agents like untrusted code on the VM, keep production tokens off the guest, and—if you adopt lend—write a short policy before you enable lend ssh.
TL;DR
| Question | Short answer |
|---|---|
| Am I affected? | Yes if you run Claude Code, Codex, or similar on remote VMs and use gh, cloud CLIs, or SSH as yourself |
| Is there a fix? | No CVE—this is a workflow pattern. lend is one OSS implementation; copying tokens to the VM is the risky default |
| Does data leave my machine? | Approved commands run locally; stdout/stderr return to the VM. Tokens injected via op read stay on the laptop unless the approved command prints them |
| What should I install? | lend on laptop and VM per GitHub install docs; run lend doctor locally and lend doctor --remote on the guest after forwarding |
| What should I avoid approving? | env, shells, op read as a command, or anything that prints environment variables—the author warns that hands secrets back to the agent |
Hacker News discussion surfaced the post November 17 with modest traction; mechanism detail below comes from the author's post and repository README, not from Beam's own tests.
Why remote VMs multiply credential risk
The author's workflow matches what many teams already do: herdr panes for multiple agents, Ovis on the phone for approval cards, agents on throwaway VMs, and the laptop holding SSH keys, 1Password, and logged-in CLIs. That split breaks when an agent needs to open a pull request or SSH to a staging host.
Two common fixes both leak authority:
- Copy tokens to the VM — A
ghtoken in~/.config/gh/hosts.ymlis readable by the agent, every child process, and anything else compromised on that disk for the token's lifetime. ssh -Aagent forwarding — Private keys stay local, but the remote side gets a socket that can sign without asking you and without an audit trail of what was signed. Our earlier write-up on Codex remote SSH agent forwarding walks through why coding agents inherit that socket.
lend targets the same use case with explicit gates on the laptop.
How lend fits in the stack
From the author's architecture diagram and GitHub README:
- On the laptop,
lend agent(orlend ssh) listens on a proxy socket and wraps your existing upstream agent (OpenSSH, 1Password, etc.). - You SSH to the VM with that proxy socket forwarded instead of the raw agent—
lend ssh --config ./policy.json -- agent-vmstarts a per-connection proxy. - On the VM, agents call
lend exec --reason "…" -- gh …or uselend mcpwith toolrun_local_command(reason required). - The request crosses the forwarded socket; lend on the laptop matches policy, shows approval, runs the real binary locally, and streams output back.
SSH and Git on the VM can keep using SSH_AUTH_SOCK pointed at the forwarded socket; lend adds the SSH agent extension path used for lend exec.
Example policy (from the post)
The author's sample policy is intentionally small:
{
"default": "deny",
"commands": [
{ "executable": "/opt/homebrew/bin/gh", "approval": "biometric:inline" }
],
"ssh": {
"default": "deny",
"keys": [
{ "fingerprint": "SHA256:...", "approval": "biometric:inline" }
]
}
}
Rules can add args_prefix (for example only gh pr view) and max_signatures per key. The repository's examples/policy.json shows op read and management operations with separate approval modes. lend doctor --config ./policy.json on the laptop validates paths and approval backends without executing secrets.
MCP wiring for Claude Code
On the VM, MCP config points at the lend binary:
{
"mcpServers": {
"laptop": { "command": "lend", "args": ["mcp"] }
}
}
When Claude Code on the VM asks for gh repo view, the laptop dialog shows the full executable path, arguments, working directory, and a reason string marked untrusted (it helps you decide but cannot widen policy). biometric:inline folds Touch ID into the same dialog on macOS.
Secrets without copying GH_TOKEN to the VM
For APIs that need an env var, policy can set secret_reader to op and attach references to specific command rules. On approval, lend reads the secret on the laptop, sets GH_TOKEN (or similar) only for that run, and returns command output. The author's post stresses the footgun: never approve env, generic shells, or op itself as a command, because output goes straight back to the agent.
Reconnects and long-running panes
herdr keeps panes alive across SSH drops, but the forwarded socket dies with the connection. The author uses:
~/.ssh/rcon the VM to symlink a stable path when the new socket speaks lend~/.bashrcchecks~/.ssh/lend/agent.sockbefore exportingSSH_AUTH_SOCK
Agents already running with a stale socket need a one-time restart after reconnect. lend status --all --watch and lend pause --all on the laptop give an operator kill switch; lend history records approvals without storing secrets by default.
Permission prompts that are not credentials
lend approve hooks (Claude Code PermissionRequest, plus adapters for Codex and others) forward VM-side permission questions to the same laptop dialog without executing locally—useful when you want Touch ID for "may I edit this file on the VM" separate from gh policy.
Attack surface lend does not remove
The author's "What lend doesn't protect against" section is worth treating as requirements, not fine print:
- Approved commands are full user code on the laptop—no syscall sandbox.
- Caller metadata from the VM is forgeable; root on the VM can hit the forwarded socket while the SSH session lives. Policy and approval still bound what can be asked.
- stdin after approval is not fully previewed; approving an interpreter is effectively approving arbitrary local behavior.
- Leases (time- or use-limited auto-approval) reset when the session ends or the screen locks—good for ergonomics, dangerous if policy is too broad.
Compare that honestly to parallel Claude Code Projects workers, which multiply cloud-side writers instead of VM SSH risk—the threat is different, but the lesson is the same: more autonomous sessions mean more paths to secrets.
What developers are saying
The Hacker News thread is young but already points at migration from other tooling:
- theyCallMeSwift (comment) reports moving from Infisical's agent-vault project because the vendor is winding it down toward SaaS, and plans to try lend.
- yoyohello13 (comment) notes the post is interesting compared with pass-based local-only scripts that do not cover remote agents.
Neither comment claims a production audit; treat them as directional interest, not a security review.
What this means if you run AI coding agents
On the VM (guest)
- Do not leave long-lived
ghor cloud tokens in the image you snapshot for agents. - After forwarding, run
lend doctor --remoteand confirm the socket advertises lend's execution extension (README doctor section). - Prefer
lend execorlend mcpover ad-hoc copies of~/.config/gh. - If you use agent forwarding today, run
ssh-add -lon the VM and compare to unlisted keys hidden by lend policy—you want the guest to see only what policy allows.
On the laptop
- Start from
default: denyand allow absolute paths togh,git, andopyou actually need—command -vpaths per the README. - Run
lend keys --socket "$SSH_AUTH_SOCK"against your real agent before writing SSH rules; copy fingerprints into policy. - Use
args_prefixfor high-risk binaries before you widen to fullgh. - Set
require_reason: trueso MCP and CLI calls must carry an explanation string. - Review
lend historyafter unattended agent runs the same way you would review CI logs.
Supply-chain angle
Install from brew install antoniomika/tap/lend or the verified install script on both sides; pin version in production images if agents are fleet-managed. The installer verifies SHA256 checksums before replacing binaries—still treat the tap and release URL like any other agent dependency and review diffs on upgrade.
This pattern sits next to hosted MCP bridges that centralize website logins—lend keeps authority on your laptop instead of a third-party credential hub, but you own policy maintenance and must revoke access when a VM image is shared outside the team.
How Beam handles this
lend is a credential boundary for remote agent hosts: it decides which laptop commands and keys a forwarded session may touch and logs approvals locally. Beam is on-device observability and hook-based deny for Claude Code and Codex on the machine where the agent runs—destructive shell patterns, heuristic skill/MCP scans, redaction before storage, and optional PreToolUse enforce when cached policy is present (policies, quickstart).
They compose rather than replace each other: lend can shrink what a VM agent extracts from your laptop, while Beam helps when the same agent (or a local checkout) runs tools you did not intend on the guest filesystem. Beam does not terminate SSH forwarding, proxy gh, or approve Touch ID dialogs; missing cached policy is fail-open for workspace rules, and scanning remains heuristic. If your team standardizes on remote VMs, pair tight lend policy with Beam on any machine that still runs a local harness (for example Remote Control threads).
Prior art and trying lend
The author cites ssh-rev-exec and op-forward as related agent-extension approaches; lend adds profiles, leases, MCP, and management rules for upstream agents. Install steps and make docs-serve for local docs are in the repository README.
If you are evaluating against pure forwarding, read our SSH agent forwarding and Codex remote sessions breakdown, and Railway's ARTEX incident as a reminder that agents plus ambient credentials on shared infrastructure fail loudly.
Related reading
- Codex remote SSH agent forwarding: claimed vs verified
- Claude Code Projects parallel workers: security before hands-free mode
- Pomerado MCP and keyless website logins
- What is AI agent monitoring?
- MCP security practical guide
- US banks blocking credential-sharing agents
Frequently asked questions
The FAQ entries in front matter mirror the questions above; see TL;DR for the fastest answers.
Does lend work with Codex and not only Claude Code?
The author's lend approve adapters mention Codex, Antigravity, and pi in the blog post, plus a JSON format for other harnesses. MCP run_local_command is harness-agnostic as long as the agent can load the lend mcp server on the VM.
Where do I get help or report issues?
Use the GitHub repository issues tracker; documentation lives under docs/ in that repo with a getting started guide.
Version details, install paths, and approval behaviour are accurate as of November 13, 2026, per Antonio Mika's blog post and the antoniomika/lend repository on GitHub. Beam did not independently audit lend's implementation.

