Repository navigation
Description
Bug type
Provider/runtime compatibility bug.
Summary
opencode-go/mimo-v2.5 works through direct inference, but fails consistently when used as the embedded agent runtime for the main Telegram/dashboard agent. The observed failure is EmbeddedAttemptSessionTakeoverError / session file changed while the embedded prompt lock was released.
This still reproduces after updating to OpenClaw 2026.5.28 stable, adding the provider-specific API key, restarting the gateway, creating fresh sessions, purging stale session files, and disabling the local session-snapshot stripping LaunchAgent.
Expected behavior
If openclaw infer model run --model opencode-go/mimo-v2.5 succeeds and the provider is configured/authenticated, the same model should be usable as an agent runtime model for normal Telegram/dashboard conversations, including follow-up turns and tool use.
Actual behavior
Direct inference succeeds, but the embedded agent runtime fails during normal conversation flow with a session takeover/lock error. Switching the same agent runtime to openai/gpt-5.5 works immediately as a control.
Reproduction / steps already tried
Environment: macOS install, OpenClaw updated from 2026.5.28-beta.4 to 2026.5.28 stable during the investigation.
- Configure
opencode-go/mimo-v2.5as the agent runtime model formain. - Confirm direct inference works:
openclaw infer model run --model opencode-go/mimo-v2.5 --prompt "Responde exactamente: ok"- Use the same model in the embedded agent runtime through Telegram/dashboard.
- First/direct call may work, but follow-up turns/tool sessions fail with
EmbeddedAttemptSessionTakeoverError/ session file changed while embedded prompt lock was released.
Troubleshooting steps that did not resolve it:
- Added
OPENCODE_GO_API_KEYto the OpenClaw environment. - Restarted the gateway.
- Started a clean Telegram session with
/new. - Purged stale files from
agents/main/sessions/. - Updated OpenClaw from
2026.5.28-beta.4to2026.5.28stable. - Ran
openclaw doctor --fix. - Performed full purge + restart +
/newagain. - Disabled the local
strip-session-snapshotsLaunchAgent / compaction-adjacent file rewrite process. - Retested after the above cleanup.
Control test:
- Switching the same agent runtime to
openai/gpt-5.5works immediately. - Other working runtime models observed locally:
github-copilot/gpt-5.4-mini,github-copilot/gpt-5.5, andanthropic/claude-opus-4-7.
Why this seems provider/runtime-specific
The important distinction is that direct model inference succeeds, but the embedded runtime path fails. That suggests this is not only a provider auth issue or a basic model availability issue. The failing path appears tied to the OpenClaw agent session lifecycle: session locks, follow-up turns, tool calling, compaction/session-file updates, or provider adapter behavior inside embedded agent execution.
Workaround
Use opencode-go/mimo-v2.5 only for direct inference for now:
openclaw infer model run --model opencode-go/mimo-v2.5 --prompt "ok"For the main Telegram/dashboard agent, use a different runtime model such as openai/gpt-5.5 or github-copilot/gpt-5.4-mini.
Related issues that may be adjacent but do not seem to cover this exact failure
- [Feature]: Support separate Zen and Go API key env vars #87790: separate Zen and Go API key env vars
- [Bug]: v4.29+ CLI local-transport stops reading ~/.env, breaks shell-based smoke tests post-upgrade #79263: local-transport CLI env loading behavior
- OpenCode Go provider: deepseek-v4-pro and deepseek-v4-flash missing from model list #74056: missing OpenCode Go models in model list
- [Bug]: opencode-go provider missing from PROVIDER_ENV_API_KEY_CANDIDATES #43247:
opencode-goprovider missing from API key candidates
Suggested next step
Please verify whether the opencode-go provider adapter supports the same embedded agent runtime/session lifecycle as the other providers. A focused regression test could compare:
- direct
infer model runsuccess, - first embedded agent turn success,
- second embedded agent turn success,
- embedded tool-call turn success,
- behavior when session compaction/snapshot updates occur.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 30, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 4:35 AM ET / 08:35 UTC.
Summary
Keep open: current main still has a plausible embedded prompt-lock takeover path for OpenCode Go embedded runs, and the most relevant recovery work is an open pull request that closes a broader session-takeover issue rather than this provider-specific report.
Reproducibility: no. there is not a high-confidence live reproduction for the exact OpenCode Go Telegram/dashboard flow. The issue has concrete steps and current source still shows the prompt-lock takeover path, but direct-infer, first embedded turn, follow-up turn, and tool-call proof were not run here.
Ways to help us reproduce this
Next step
Maintainers should review the open recovery pull request and decide whether OpenCode Go needs separate live validation or provider-specific follow-up before any new automated fix branch is safe.
Review details
Best possible solution:
Keep this provider-specific tracker open until maintainers either land the broader session-takeover recovery path and verify OpenCode Go embedded turns, or identify a narrower OpenCode Go/runtime fix with live proof.
Do we have a high-confidence way to reproduce the issue?
No, there is not a high-confidence live reproduction for the exact OpenCode Go Telegram/dashboard flow. The issue has concrete steps and current source still shows the prompt-lock takeover path, but direct-infer, first embedded turn, follow-up turn, and tool-call proof were not run here.
Is this the best way to solve the issue?
Unclear: the broader session-takeover recovery in #89039 looks like the likely owner boundary for message-loss recovery, but this provider-specific issue still needs live OpenCode Go validation before maintainers can call it solved.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 9940110b881b.
Label changes
Label justifications:
P1: A configured agent runtime model can fail real Telegram/dashboard conversations while the same model works through direct inference.impact:session-state: The reported failure is an embedded session-lock/fingerprint takeover during the agent runtime lifecycle.impact:message-loss: The embedded follow-up/tool-turn failure can prevent the expected channel reply from reaching the user.impact:auth-provider: The failure is provider/model-specific: OpenCode Go authenticates and works for direct inference but fails in the embedded runtime path.Evidence reviewed
Acceptance criteria:
openclaw infer model run --model opencode-go/mimo-v2.5, first embedded Telegram/dashboard turn, follow-up turn, and tool-call turn.What I checked:
AGENTS.md:1, 9940110b881b)opencode-goas a runtime provider and show configuring it as the default agent model, so the expected embedded-agent use is within documented product behavior. Public docs:docs/providers/opencode-go.md. (docs/providers/opencode-go.md:9, 9940110b881b)mimo-v2.5under provideropencode-gowithapi: "openai-completions", tying the report to the native OpenAI-compatible transport path. (extensions/opencode-go/provider-catalog.ts:217, 9940110b881b)reacquireAfterPrompt()still asserts the session-file fence and can throwEmbeddedAttemptSessionTakeoverError. (src/agents/embedded-agent-runner/run/attempt.session-lock.ts:1978, 9940110b881b)EmbeddedAttemptSessionTakeoverError; that proves the central failure class is still an intentional source path on current main. (src/agents/embedded-agent-runner/run/attempt.session-lock.test.ts:1794, 9940110b881b)Likely related people:
src/agents/pi-embedded-runner/run/attempt.session-lock.ts,src/agents/pi-embedded-runner/run/attempt.ts,src/agents/embedded-agent-runner/run/attempt.session-lock.ts)src/agents/embedded-agent-runner/run/attempt.session-lock.ts,src/agents/embedded-agent-runner/run/attempt.session-lock.test.ts,src/agents/openai-transport-stream.ts)opencode-goruntime path. (role: recent OpenCode Go provider contributor; confidence: medium; commits: 82552270b9b7; files:extensions/opencode-go/index.ts,extensions/opencode-go/provider-catalog.ts,src/agents/context.opencode-go.test.ts)docs/providers/opencode-go.md,extensions/opencode-go)src/agents/embedded-agent-runner/run/attempt.session-lock.ts,src/agents/embedded-agent-runner/run/attempt.ts,src/auto-reply/reply/agent-runner-execution.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.openclaw-barnacle commentedon Jun 15, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 6, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 15, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.