code run/status/attach/stop: 'initialize MCP session: transport closed' when agent-box is missing on the box
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with internal/coderun/session.go and trace how the SSH subprocess and MCP session report failures when agent-box is absent. Use scripts/code-run-fake-agent-e2e.sh to reproduce the fresh-box case. Done means the CLI surfaces a clear missing-agent-box cause and remediation instead of only reporting a transport-closed error.
Written by the indexing model from the issue text.
Description
Summary
On a plain freshly-created box (no agent-box installed), every containarium code run|status|attach|stop fails with:
Error: connect to agent-box on "<box>": initialize MCP session: transport error: transport closed
That says nothing about the actual problem: the CLI runs ssh <box> -- agent-box (internal/coderun/session.go), the remote shell answers command not found, ssh exits, and the MCP handshake sees EOF.
Repro
containarium create <name> --ssh-key <pub>(no coding-agent provisioning).- Wait for SSH to work.
containarium code status <name>.
Expected
A clear error naming the cause and the fix, e.g. agent-box is not installed on <box> — install it (see docs) or provision the box for coding agents. Capture the ssh subprocess's stderr and surface it (or a check like command -v agent-box) rather than reporting only the transport EOF. Consider a containarium code install-style step (or extending it) that installs agent-box too, since code run cannot work without it.
Found by
scripts/code-run-fake-agent-e2e.sh on a fresh box; it now installs agent-box itself when missing.
- Dominant language
- Go
- Stars
- 296
- Forks
- 38
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 353
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FootprintAI/Containarium
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
FootprintAI/Containarium#2338 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
FootprintAI/Containarium#2299 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FootprintAI/Containarium#2170 ·
Maintainers usually reply within 1 day
-
feature requests
Difficulty 4/5 3-5 days Newbie friendliness 52/100
FootprintAI/Containarium#2328 ·
Maintainers usually reply within 1 day
-
core-guard-legit-flows-e2e.sh reports logged drops as unlogged: `journalctl | grep -q` takes SIGPIPE under pipefailPossibly taken @hsinatfootprintai claimed this 1 day ago. Openbug
FootprintAI/Containarium#2323 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in FootprintAI/Containarium
Similar issues
-
needs-area needs-kind needs-priority needs-status needs-triage
Difficulty 2/5 Under an hour Newbie friendliness 85/100
cncf/automation#736 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Telegram webhook: line breaks lost since switch to rich messagesPossibly taken @Kshot3000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
shukiv/jabali-panel#2029 ·
Maintainers usually reply within 1 day
-
[submenu] nil issue on ubuntu 26.04Possibly taken @egoist claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day