Bug: opencode --continue --prompt does not work #6454

Open
opened 2026-02-16 18:04:16 -05:00 by yindo · 3 comments
Owner

Originally created by @s1n7ax on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When we have --continue, --prompt stops working. It would be nice to be able to start with a prompt in the last session.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @s1n7ax on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When we have `--continue`, `--prompt` stops working. It would be nice to be able to start with a prompt in the last session. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:04:16 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4378: --continue doesn't always continue the project's previous session
  • #5000: opencode --continue doesn't restore state of previous subagent pane
  • #8551: Using --prompt causes the wrong model to be selected
  • #7485: using --prompt should wait for prompt configuration loading

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #4378: --continue doesn't always continue the project's previous session - #5000: opencode --continue doesn't restore state of previous subagent pane - #8551: Using --prompt causes the wrong model to be selected - #7485: using --prompt should wait for prompt configuration loading Feel free to ignore if none of these address your specific case.
Author
Owner

@pmist commented on GitHub (Feb 3, 2026):

Any ETA for this one?

Running this command and getting the following logs.
Command
npx opencode run "Say hello" --agent plan -f ".file.md" --print-logs --log-level DEBUG

System
Windows Server 2025

Output

INFO  2026-02-04T03:32:03 +5297ms service=default version=1.1.42 args=["run","Allow user to logout by adding JWT to RevokedToken","--agent","plan","-f",".instructions/backend_requirement_creation.md","--print-logs","--log-level","DEBUG"] opencode
INFO  2026-02-04T03:32:03 +32ms service=default directory=C:\Work\Projects\Test\sc-be creating instance
INFO  2026-02-04T03:32:03 +5ms service=project directory=C:\Work\Projects\Test\sc-be fromDirectory
INFO  2026-02-04T03:32:04 +804ms service=default directory=C:\Work\Projects\Test\sc-be bootstrapping
INFO  2026-02-04T03:32:04 +90ms service=config path=C:\Users\Administrator\.config\opencode\config.json loading
INFO  2026-02-04T03:32:04 +15ms service=config path=C:\Users\Administrator\.config\opencode\opencode.json loading
INFO  2026-02-04T03:32:04 +22ms service=config path=C:\Users\Administrator\.config\opencode\opencode.jsonc loading
INFO  2026-02-04T03:32:04 +70ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.1.42","--exact"] cwd=C:\Users\Administrator\.config\opencode running
DEBUG 2026-02-04T03:32:04 +128ms service=config loading config from C:\Work\Projects\Test\sc-be\.opencode\opencode.jsonc
INFO  2026-02-04T03:32:04 +1ms service=config path=C:\Work\Projects\Test\sc-be\.opencode\opencode.jsonc loading
DEBUG 2026-02-04T03:32:04 +6ms service=config loading config from C:\Work\Projects\Test\sc-be\.opencode\opencode.json
INFO  2026-02-04T03:32:04 +0ms service=config path=C:\Work\Projects\Test\sc-be\.opencode\opencode.json loading
INFO  2026-02-04T03:32:04 +1ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.1.42","--exact"] cwd=C:\Work\Projects\Test\sc-be\.opencode running
INFO  2026-02-04T03:32:04 +194ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO  2026-02-04T03:32:04 +13ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO  2026-02-04T03:32:04 +75ms service=plugin path=opencode-anthropic-auth@0.0.13 loading plugin
INFO  2026-02-04T03:32:05 +1016ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.2 loading plugin
INFO  2026-02-04T03:32:06 +151ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.42

2 packages installed [748.00ms]
 stderr=Saved lockfile
 done
INFO  2026-02-04T03:32:06 +0ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","install"] cwd=C:\Users\Administrator\.config\opencode running
INFO  2026-02-04T03:32:06 +93ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.42

2 packages installed [707.00ms]
 stderr=Saved lockfile
 done
INFO  2026-02-04T03:32:06 +47ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","install"] cwd=C:\Work\Projects\Test\sc-be\.opencode running
INFO  2026-02-04T03:32:08 +1916ms service=bus type=* subscribing
INFO  2026-02-04T03:32:08 +1ms service=bus type=session.updated subscribing
INFO  2026-02-04T03:32:08 +0ms service=bus type=message.updated subscribing
INFO  2026-02-04T03:32:08 +22ms service=bus type=message.part.updated subscribing
INFO  2026-02-04T03:32:08 +1ms service=bus type=session.updated subscribing
INFO  2026-02-04T03:32:08 +6ms service=bus type=message.updated subscribing
INFO  2026-02-04T03:32:08 +0ms service=bus type=message.part.updated subscribing
INFO  2026-02-04T03:32:08 +0ms service=bus type=session.diff subscribing
INFO  2026-02-04T03:32:08 +1ms service=format init
INFO  2026-02-04T03:32:08 +4ms service=bus type=file.edited subscribing
INFO  2026-02-04T03:32:08 +17ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers
INFO  2026-02-04T03:32:08 +9ms service=file.watcher init
INFO  2026-02-04T03:32:08 +110ms service=scheduler id=snapshot.cleanup run
INFO  2026-02-04T03:32:08 +2ms service=scheduler id=tool.truncation.cleanup run
INFO  2026-02-04T03:32:08 +24ms service=bus type=command.executed subscribing
INFO  2026-02-04T03:32:08 +53ms service=file.watcher platform=win32 backend=windows watcher backend
ERROR 2026-02-04T03:32:08 +539ms service=server error= failed
Error: Session not found
@pmist commented on GitHub (Feb 3, 2026): Any ETA for this one? Running this command and getting the following logs. Command `npx opencode run "Say hello" --agent plan -f ".file.md" --print-logs --log-level DEBUG` System `Windows Server 2025` Output ``` INFO 2026-02-04T03:32:03 +5297ms service=default version=1.1.42 args=["run","Allow user to logout by adding JWT to RevokedToken","--agent","plan","-f",".instructions/backend_requirement_creation.md","--print-logs","--log-level","DEBUG"] opencode INFO 2026-02-04T03:32:03 +32ms service=default directory=C:\Work\Projects\Test\sc-be creating instance INFO 2026-02-04T03:32:03 +5ms service=project directory=C:\Work\Projects\Test\sc-be fromDirectory INFO 2026-02-04T03:32:04 +804ms service=default directory=C:\Work\Projects\Test\sc-be bootstrapping INFO 2026-02-04T03:32:04 +90ms service=config path=C:\Users\Administrator\.config\opencode\config.json loading INFO 2026-02-04T03:32:04 +15ms service=config path=C:\Users\Administrator\.config\opencode\opencode.json loading INFO 2026-02-04T03:32:04 +22ms service=config path=C:\Users\Administrator\.config\opencode\opencode.jsonc loading INFO 2026-02-04T03:32:04 +70ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.1.42","--exact"] cwd=C:\Users\Administrator\.config\opencode running DEBUG 2026-02-04T03:32:04 +128ms service=config loading config from C:\Work\Projects\Test\sc-be\.opencode\opencode.jsonc INFO 2026-02-04T03:32:04 +1ms service=config path=C:\Work\Projects\Test\sc-be\.opencode\opencode.jsonc loading DEBUG 2026-02-04T03:32:04 +6ms service=config loading config from C:\Work\Projects\Test\sc-be\.opencode\opencode.json INFO 2026-02-04T03:32:04 +0ms service=config path=C:\Work\Projects\Test\sc-be\.opencode\opencode.json loading INFO 2026-02-04T03:32:04 +1ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.1.42","--exact"] cwd=C:\Work\Projects\Test\sc-be\.opencode running INFO 2026-02-04T03:32:04 +194ms service=plugin name=CodexAuthPlugin loading internal plugin INFO 2026-02-04T03:32:04 +13ms service=plugin name=CopilotAuthPlugin loading internal plugin INFO 2026-02-04T03:32:04 +75ms service=plugin path=opencode-anthropic-auth@0.0.13 loading plugin INFO 2026-02-04T03:32:05 +1016ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.2 loading plugin INFO 2026-02-04T03:32:06 +151ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.42 2 packages installed [748.00ms] stderr=Saved lockfile done INFO 2026-02-04T03:32:06 +0ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","install"] cwd=C:\Users\Administrator\.config\opencode running INFO 2026-02-04T03:32:06 +93ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.42 2 packages installed [707.00ms] stderr=Saved lockfile done INFO 2026-02-04T03:32:06 +47ms service=bun cmd=["C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","install"] cwd=C:\Work\Projects\Test\sc-be\.opencode running INFO 2026-02-04T03:32:08 +1916ms service=bus type=* subscribing INFO 2026-02-04T03:32:08 +1ms service=bus type=session.updated subscribing INFO 2026-02-04T03:32:08 +0ms service=bus type=message.updated subscribing INFO 2026-02-04T03:32:08 +22ms service=bus type=message.part.updated subscribing INFO 2026-02-04T03:32:08 +1ms service=bus type=session.updated subscribing INFO 2026-02-04T03:32:08 +6ms service=bus type=message.updated subscribing INFO 2026-02-04T03:32:08 +0ms service=bus type=message.part.updated subscribing INFO 2026-02-04T03:32:08 +0ms service=bus type=session.diff subscribing INFO 2026-02-04T03:32:08 +1ms service=format init INFO 2026-02-04T03:32:08 +4ms service=bus type=file.edited subscribing INFO 2026-02-04T03:32:08 +17ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers INFO 2026-02-04T03:32:08 +9ms service=file.watcher init INFO 2026-02-04T03:32:08 +110ms service=scheduler id=snapshot.cleanup run INFO 2026-02-04T03:32:08 +2ms service=scheduler id=tool.truncation.cleanup run INFO 2026-02-04T03:32:08 +24ms service=bus type=command.executed subscribing INFO 2026-02-04T03:32:08 +53ms service=file.watcher platform=win32 backend=windows watcher backend ERROR 2026-02-04T03:32:08 +539ms service=server error= failed Error: Session not found ```
Author
Owner

@JosXa commented on GitHub (Feb 4, 2026):

My use case: opencode --continue --prompt "continue" in an alias, to use after a crash.

@JosXa commented on GitHub (Feb 4, 2026): My use case: `opencode --continue --prompt "continue"` in an alias, to use after a crash.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6454