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
Home/end keys don't jump to the start/end of input as expected #54519
Type some stuff, press home. The cursor should jump to the start of the input but it doesn't. I found this old issue about it but it's been closed as completed... #2649
Version 1.18.34 is OpenCode v1 (the opencode-ai package). v1 only gets fixes for critical bugs such as data loss, security problems or crashes, so this probably won't be fixed there. In the meantime, ctrl+a and ctrl+e move the cursor to the start and end of the line by default.
We'd encourage you to try OpenCode v2 (@opencode/cli), where active development happens. Just so you know: from what I can see, v2 still binds home to jumping to the first message by default, and the input cursor movements are separate keybinds.
If you think this is critical, or if you can reproduce it on v2, please reply here with the v2 version (opencode --version) and we'll take another look.
I found several more reports of this that have all been automatically closed. You'd think this wouldn't be too hard to fix. I wonder if Pi has this issue... #27661#29053#31332.
OpenCode v2 doesn't seem to have been released yet? But yeah it doesn't look like it is fixed.
Thanks for following up, @Timmmm. I reproduced this on v2.0.26 (@opencode/cli, now released), and it still happens on the latest dev (d21b079).
Steps:
Start a session and get a reply long enough to scroll.
In the prompt type hello world and press Home: the message list jumps to the first message and the cursor stays where it was.
Type X, press End, type Y: the prompt reads hello worldXY instead of Xhello worldY.
On the start screen, before any session exists, Home and End do move the cursor. In a session, though, the default Home/End keybindings jump through the message list while you're typing. The recording and screenshot below show it, and the script below reproduces it.
Until this is addressed, ctrl+a / ctrl+e move to the start or end of the line. Related reports: #27661, #29053, #31332, #2649.
recording.mp4
Reproduction script (drive.ts)
// Repro for #54519: Home/End do not move the prompt cursor to start/end of input.// After typing "hello world", press Home, then type "X". Expected "Xhello world".// Then press End and type "Y". Expected "Xhello worldY".import{Effect}from"effect"import{Llm,OpenCodeDriver}from"opencode-drive"constcheck=(ui: {capture: ()=>Effect.Effect<unknown,unknown,never>},label: string)=>Effect.gen(function*(){constframe: any=yield*ui.capture()consttext: string=JSON.stringify(frame)constlines=(frame.lines??frame.text?.split?.("\n")??[])asstring[]consthit=(Array.isArray(lines) ? lines : []).filter((l: any)=>String(l).match(/hello|world|X|Y/))yield*Effect.log(`${label}: ${hit.length ? hit.map(String).join(" | ") : text.match(/[^"]{0,20}helloworld[^"]{0,20}/g)}`)})exportdefaultOpenCodeDriver.use({
...(process.env.OC_DEV ? {opencode: {dev: process.env.OC_DEV}} : {}),tui: {recording: true,keypressOverlay: true},},({ ui, llm })=>Effect.gen(function*(){// 1) Home screenyield*ui.type("hello world")yield*Effect.sleep(300)yield*ui.press("home")yield*ui.type("X")yield*ui.press("end")yield*ui.type("Y")yield*Effect.sleep(500)yield*ui.screenshot("home-screen")yield*check(ui,"home screen")// clear prompt and go into a sessionyield*ui.press("u",{ctrl: true})yield*ui.press("u",{ctrl: true})yield*llm.queue(Llm.text("First reply.\n\n"+Array.from({length: 40},(_,i)=>`line ${i+1}`).join("\n")))yield*ui.submit("first message")yield*ui.waitFor("line 40")yield*Effect.sleep(500)// 2) Inside a sessionyield*ui.type("hello world")yield*Effect.sleep(300)yield*ui.press("home")yield*Effect.sleep(300)yield*ui.screenshot("session-after-home")yield*ui.type("X")yield*ui.press("end")yield*Effect.sleep(300)yield*ui.type("Y")yield*Effect.sleep(500)yield*ui.screenshot("session-after-end")yield*check(ui,"session")}),)
Run it with opencode-drive: opencode-drive run ./drive.ts. It drives opencode from your PATH; set OC_DEV to the path of an OpenCode checkout to run that from source instead.
Activity
opencode-agent commentedon Oct 11, 2026
Thanks for the report, @Timmmm!
Version 1.18.34 is OpenCode v1 (the
opencode-aipackage). v1 only gets fixes for critical bugs such as data loss, security problems or crashes, so this probably won't be fixed there. In the meantime,ctrl+aandctrl+emove the cursor to the start and end of the line by default.We'd encourage you to try OpenCode v2 (
@opencode/cli), where active development happens. Just so you know: from what I can see, v2 still bindshometo jumping to the first message by default, and the input cursor movements are separate keybinds.Related issues:
If you think this is critical, or if you can reproduce it on v2, please reply here with the v2 version (
opencode --version) and we'll take another look.Timmmm commentedon Oct 11, 2026
I found several more reports of this that have all been automatically closed. You'd think this wouldn't be too hard to fix. I wonder if Pi has this issue... #27661 #29053 #31332.
OpenCode v2 doesn't seem to have been released yet? But yeah it doesn't look like it is fixed.
opencode-agent commentedon Oct 11, 2026
Thanks for following up, @Timmmm. I reproduced this on v2.0.26 (
@opencode/cli, now released), and it still happens on the latestdev(d21b079).Steps:
hello worldand press Home: the message list jumps to the first message and the cursor stays where it was.X, press End, typeY: the prompt readshello worldXYinstead ofXhello worldY.On the start screen, before any session exists, Home and End do move the cursor. In a session, though, the default Home/End keybindings jump through the message list while you're typing. The recording and screenshot below show it, and the script below reproduces it.
Until this is addressed,
ctrl+a/ctrl+emove to the start or end of the line. Related reports: #27661, #29053, #31332, #2649.recording.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊