Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-tty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spawn-dock/cli": patch
---

fix: force TTY allocation (-tt) during SSH so opencode is fully interactive without tmux
21 changes: 12 additions & 9 deletions packages/app/src/docker-git/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,18 @@ const spawnAttachDirect = (
{
cwd: process.cwd(),
command: "ssh",
args: buildSshArgs(
template,
sshKey,
ipAddress,
`cd '${projectDir}' && spawn-dock agent`
).filter((arg) =>
arg !== "-T" && arg !== "-o" && arg !== "BatchMode=yes" && arg !== "ConnectTimeout=2" &&
arg !== "ConnectionAttempts=1"
)
args: [
"-tt", // Force TTY allocation for interactive opencode session
...buildSshArgs(
template,
sshKey,
ipAddress,
`cd '${projectDir}' && spawn-dock agent`
).filter((arg) =>
arg !== "-T" && arg !== "-o" && arg !== "BatchMode=yes" && arg !== "ConnectTimeout=2" &&
arg !== "ConnectionAttempts=1"
)
]
},
[0, 255], // SSH frequently exits with 255 on user disconnect, which is normal
(exitCode) => new CommandFailedError({ command: "ssh agent", exitCode })
Expand Down