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
ax ssh <task> [-- command...] doesn't open an SSH session. It starts a process in the task's container through the Agent Substrate guest process service and streams the process's stdout and stderr back, which is what kubectl exec does. The ssh name suggests keys, an sshd in the sandbox, or an interactive login, and none of those apply.
It isn't interactive either. The README describes ax ssh task123 as an interactive shell, but guest.ExecOptions has no stdin or TTY, so the /bin/sh that runs when no command is given can't read anything you type.
There's also no way to copy files into or out of a sandbox, which kubectl cp covers for pods.
Proposal
ax exec
Rename ax ssh to ax exec and follow kubectl exec conventions:
ax exec task123 -- ls -la /workspace
ax exec -a my-atespace task123 -- python3 main.py
ax exec task123 -- sh -c 'cd /workspace && git status'
-- is required between the task name and the command, as with kubectl exec. Today it's optional.
A command is required, as with kubectl exec. Today a missing command defaults to /bin/sh, which isn't useful without stdin.
The existing checks stay: the task must be Running and have spec.debug: true.
ax cp
Add ax cp, following kubectl cp: one argument is a local path, the other is <task>:<path>, and it copies from the first argument to the second.
ax cp task123:/workspace/report.json ./report.json # from the sandbox
ax cp ./config.yaml task123:/workspace/config.yaml # into the sandbox
ax cp my-atespace/task123:/workspace/out.log .# atespace/task, like kubectl's namespace/pod
Just wondering how stdin would work after the rename. Since #413 added stdin forwarding, would ax exec keep it enabled by default, or would it require -i like kubectl exec?
Activity
ktsoator commentedon Oct 17, 2026
Just wondering how stdin would work after the rename. Since #413 added stdin forwarding, would ax exec keep it enabled by default, or would it require -i like kubectl exec?