Skip to content

Commit 609704c

Browse files
fix: add --session flag to attach command
Allows attaching to a running server and opening a specific session: opencode attach http://localhost:4096 -s <session_id> Fixes anomalyco#5445 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent cd9898a commit 609704c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/opencode/src/cli/cmd/tui/attach.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ export const AttachCommand = cmd({
1414
.option("dir", {
1515
type: "string",
1616
description: "directory to run in",
17+
})
18+
.option("session", {
19+
alias: ["s"],
20+
type: "string",
21+
describe: "session id to continue",
1722
}),
1823
handler: async (args) => {
1924
if (args.dir) process.chdir(args.dir)
2025
await tui({
2126
url: args.url,
22-
args: {},
27+
args: { sessionID: args.session },
2328
})
2429
},
2530
})

0 commit comments

Comments
 (0)