You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cursor-agent cannot start over TRAMP displaying Loading… forever #872
If M-x agent-shell won't start cursor-agent in 2-3 s then it hangs at "Loading…" forever. If it loads cursor-agent then I can use it.
Can you make the startup more robust?
Additional info:
I set agent-shell-cursor-acp-command to absolute cursor-agent path specifically, because it's the only way it starts
cursor-agent never started if I only added /home/myusername/.local/bin to tramp-remote-path
no problem when not using TRAMP
cursor-agent normally starts several seconds for me when using CLI only but never fails
my ssh server displays its MOTD that I cannot get rid of
I'm using Fedora 44 on WSL on Windows 11
I use self compiled curl 7.76 and pass it to shell-maker through its configuration variable, because otherwise I cannot use cursor-agent event when it loads through agent-shell
Checklist
I agree to communicate with the author myself (not AI-generated).
{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"clientInfo":{"name":"agent-shell","title":"Emacs Agent Shell","version":"0.81.1"},"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true}}}}
l
Will need more details. Are you using https://github.com/junyi-hou/agent-shell-tramp? This is the only TRAMP mechanism known to work at present. Also please share the entire elisp snippet you've used to configure agent-shell.
Note this probably needs non-interactive auth (e.g. ssh keys/agent) and doesn't work with multi-hop connections.
If it still hangs, please share the full ACP log from a hung run (any incoming text or stderr?), plus the debug tramp/... buffer with (setq tramp-verbose 6).
Also, shell-maker-curl-executable shouldn't matter here. agent-shell talks to the agent over stdio, not curl.
direct async fails fast with "method not found: initialize" Error (-32601) . I attach the tramp and acp log for it. I also attach the tramp log for direct async disabled. The acp log for this case is the same as before so I'm not attaching it.
I use a ssh key configured in my WSL to connect to the host, so I believe auth is non-interactive. How can I tell, if my host is multi-hop?
Thanks, these logs help. Direct async actually gets further. Your ACP log shows our own initialize request coming straight back to us as an incoming message. TRAMP runs ssh with -t -t for direct async, which gives cursor-agent a remote terminal, and that terminal echoes our input back. cursor-agent's real response does arrive right after, it's just too late.
Could you try this alongside the direct async config? It tells TRAMP to skip the -t -t:
I tried it three times in a row and it always succeed. Thanks.
Could you add these tips to your README file?
BTW., the following error
agent-shell--start: Executable "agent" not found. Do you need (add-to-list 'exec-path "another/path/to/consider/")? See https://cursor.com/docs/cli for installation.
was not helpful in the context of TRAMP.
It would be more helpful to mention that I need to add the path of cursor-agent relative to my host to tramp-remote-path.
Activity
xenodium commentedon Oct 6, 2026
Will need more details. Are you using https://github.com/junyi-hou/agent-shell-tramp? This is the only TRAMP mechanism known to work at present. Also please share the entire elisp snippet you've used to configure agent-shell.
wojnilowicz commentedon Oct 6, 2026
Thanks for your attention. Yes, I'm using agent-shell-tramp but I believe it's not needed to make a connection to the cursor-agent binary.
xenodium commentedon Oct 7, 2026
cc @junyi-hou who is likely better suited to troubleshoot this.
Some things that may help... From your traffic, initialize goes out but nothing ever comes back, and the process doesn't exit either. Could you try:
Note this probably needs non-interactive auth (e.g. ssh keys/agent) and doesn't work with multi-hop connections.
Also, shell-maker-curl-executable shouldn't matter here. agent-shell talks to the agent over stdio, not curl.
wojnilowicz commentedon Oct 7, 2026
direct async fails fast with "method not found: initialize" Error (-32601) . I attach the tramp and acp log for it. I also attach the tramp log for direct async disabled. The acp log for this case is the same as before so I'm not attaching it.
I use a ssh key configured in my WSL to connect to the host, so I believe auth is non-interactive. How can I tell, if my host is multi-hop?
traffic-direct-async.txt
tramp-direct-async.txt
tramp-no-direct-async.txt
xenodium commentedon Oct 8, 2026
Thanks, these logs help. Direct async actually gets further. Your ACP log shows our own initialize request coming straight back to us as an incoming message. TRAMP runs ssh with -t -t for direct async, which gives cursor-agent a remote terminal, and that terminal echoes our input back. cursor-agent's real response does arrive right after, it's just too late.
Could you try this alongside the direct async config? It tells TRAMP to skip the -t -t:
You may need M-x tramp-cleanup-all-connections (or an Emacs restart) for it to take effect.
Re multi-hop: from your log it's a single ssh hop, so you're probably fine there.
wojnilowicz commentedon Oct 8, 2026
I tried it three times in a row and it always succeed. Thanks.
Could you add these tips to your README file?
BTW., the following error
was not helpful in the context of TRAMP.
It would be more helpful to mention that I need to add the path of cursor-agent relative to my host to tramp-remote-path.
Add further guidance on TRAMP loading issue #872
xenodium commentedon Oct 9, 2026
Great to hear.
Done in #872
Also done in #872
Consider sponsoring (or getting your employer to do so) the project. Maintaining and providing support like in this instance takes daily effort.