GeezerVison is showing github.com — [BUG]: V2 web app: plugin and MCP tool calls can't be expanded, so their input and output are not shown · Issue #55961 · anomalyco/opencode
[BUG]: V2 web app: plugin and MCP tool calls can't be expanded, so their input and output are not shown #55961DescriptionDescription
In the V2 web app, a plugin or MCP tool call without a dedicated renderer is shown as a single header row that cannot be expanded. The tool's output is never shown, and long or multi-line input values are squeezed onto that one line and cut off with an ellipsis. There is no way to see what the tool was called with or what it returned.
The fallback renderer GenericTool renders BasicTool with only a trigger: a subtitle plus at most three primitive key=value args, no children, and it ignores output. ToolDisplay already passes output and metadata to it.
The V2 TUI handles the same case: its GenericTool expands on click to show every input field and the output.
This was reported before for the V1 desktop and web UI in #15825 and #27659, with fixes proposed in #15865 and #22035. All four were closed automatically for inactivity, not because the problem was fixed.
Expected: same behavior as the TUI. The row can be expanded to show the full input and output, and is collapsed by default.
Plugins
A local plugin that registers custom tools with long string inputs
OpenCode version
2.0.29
Steps to reproduce
- Register a plugin tool, or connect an MCP server, whose input includes a multi-line string and whose result is plain text.
- Have the agent call it.
- Open the session in the web app.
- The call shows as one row, for example
Called `messageSession` <description> sessionID=ses_… message=<first line…>. The multi-line message is cut off, there is no expand arrow, and the output is not shown.
- Open the same session in the TUI and click the tool row. The full input and output are shown.
Operating System
Fedora 44 Activityopencode-agent commented on Oct 16, 2026 Thanks for the detailed report. I could reproduce this on 2.0.29, and it still happens on the latest dev (32b41bab1).
What I did:
- Attached a custom tool,
messageSession, that takes sessionID and a three-line message and returns plain text.
- Had a simulated model call it.
- Opened the session in the web UI the server serves, expanded the "Used 1 messageSession" group and clicked the tool row.
The row shows Called `messageSession` sessionID=se… message=first line of message second line of message third l…. The multi-line input is joined onto one line and cut off. Clicking the row does nothing, and the tool's output never appears on the page. The screenshots below show this on 2.0.29 and on dev, and the script below reproduces it.
As you pointed out, the fallback GenericTool in packages/session-ui/src/components/basic-tool.tsx renders only a header with no expandable content and ignores output. That code has not changed on dev. Related earlier reports and fixes for v1 that were closed for inactivity: #23627, #27659, #22035.


Reproduction script (drive.ts)
// Reproduces #55961: a plugin/MCP-like tool call in the V2 web app cannot be expanded; its output is never shown.
// Needs Playwright with Chromium (here: `bun add playwright` in /tmp/opencode/pw, then `bunx playwright install --with-deps chromium`).
// Run: OPENCODE_DRIVE_MEDIA_DIR=/workspace/media opencode-drive run drive.ts (OC_DEV=<checkout> runs from source; build packages/app first)
import { Effect } from "effect"
import { Llm, OpenCodeDriver } from "opencode-drive"
// Browser step: sign in to the web UI, open the session, expand the tool group, click the tool row.
const WEB = `// Usage: node web.mjs <url> <password> <out.png>
import { chromium } from "/tmp/opencode/pw/node_modules/playwright/index.mjs"
const [url, password, out] = process.argv.slice(2)
const browser = await chromium.launch()
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1000 }, ...(password ? { httpCredentials: { username: "opencode", password } } : {}) })
const page = await ctx.newPage()
await page.goto(url)
await page.waitForTimeout(6000)
// Sign in with the server password through the app's "Use password" form.
await page.getByText("Use password").click()
await page.waitForTimeout(500)
const inputs = page.locator("input:visible")
console.log("INPUTS", JSON.stringify(await inputs.evaluateAll((xs) => xs.map((x) => [x.type, x.name, x.placeholder]))))
const n = await inputs.count()
for (let i = 0; i < n; i++) {
const type = await inputs.nth(i).getAttribute("type")
const ph = (await inputs.nth(i).getAttribute("placeholder")) ?? ""
if (type === "password") await inputs.nth(i).fill(password)
else if (/user/i.test(ph)) await inputs.nth(i).fill("opencode")
else await inputs.nth(i).fill(url)
}
await page.keyboard.press("Enter")
await page.waitForTimeout(6000)
await page.screenshot({ path: out + "-home.png" })
console.log("HOME_TEXT", (await page.locator("body").innerText()).slice(0, 1500))
// Open the project, then its most recent session.
await page.getByText("files", { exact: true }).first().click()
await page.waitForTimeout(4000)
console.log("PROJECT_TEXT", (await page.locator("body").innerText()).slice(0, 1500))
console.log("URL", page.url())
const links = await page.locator("a").evaluateAll((as) => as.map((a) => a.getAttribute("href")))
console.log("LINKS", JSON.stringify(links))
const s = links.find((h) => h && h.includes("ses_"))
if (s) {
await page.goto(new URL(s, url).toString())
await page.waitForTimeout(6000)
await page.screenshot({ path: out + "-session.png" })
// Expand the "Used 1 messageSession" group to reveal the tool row.
await page.getByText("messageSession").first().click()
await page.waitForTimeout(1500)
await page.screenshot({ path: out + "-group-open.png" })
console.log("GROUP_TEXT", (await page.locator("body").innerText()).slice(0, 1500))
const row = page.locator('[data-component="tool-part-wrapper"]').first()
console.log("ROW_HTML", (await row.innerHTML({ timeout: 5000 }).catch((e) => String(e))).slice(0, 3000))
await row.click({ timeout: 3000 }).catch((e) => console.log("CLICK_ERR", e.message))
await page.waitForTimeout(1500)
await page.screenshot({ path: out + "-session-clicked.png" })
const body = await page.locator("body").innerText()
console.log("OUTPUT_VISIBLE", body.includes("TOOL-OUTPUT-MARKER"), "LINE3_VISIBLE", body.includes("third line of message"))
}
await browser.close()
`
export default OpenCodeDriver.use(
{ ...(process.env.OC_DEV ? { opencode: { dev: process.env.OC_DEV } } : {}), tui: { recording: true } },
({ tools, llm, ui }) =>
Effect.gen(function* () {
yield* tools.attach({
tools: [
{
name: "messageSession",
description: "Send a message to a session",
inputSchema: {
type: "object",
properties: { sessionID: { type: "string" }, message: { type: "string" } },
required: ["sessionID", "message"],
},
options: { codemode: false },
},
],
})
yield* llm.queue(
Llm.toolCall({
index: 0,
id: "call_msg",
name: "messageSession",
input: {
sessionID: "ses_example123",
message: "first line of message\nsecond line of message\nthird line of message that is long enough to be cut off",
},
}),
Llm.finish("tool-calls"),
)
yield* llm.queue(Llm.text("Done."))
yield* ui.submit("Send the message")
const call = yield* tools.take("call_msg")
yield* call.finish({ structured: {}, content: [{ type: "text", text: "TOOL-OUTPUT-MARKER: message delivered\nsecond output line" }] })
yield* ui.waitFor("Done.")
yield* ui.screenshot("tui-after-call")
// Open the same session in the web app the server serves.
yield* Effect.promise(async () => {
await Bun.write("/tmp/opencode/web.mjs", WEB)
const found = Bun.spawnSync(["bash", "-c", "find / -xdev -name 'service*.json' -path '*opencode*' -mmin -10 2>/dev/null"]).stdout.toString().trim().split("\n").filter(Boolean)
console.log("SERVICE_FILES", found)
for (const f of found) {
const reg = await Bun.file(f).json().catch(() => undefined)
if (!reg?.url) continue
console.log("REG", reg.url)
const p = Bun.spawnSync(["node", "/tmp/opencode/web.mjs", reg.url, reg.password ?? "", `/workspace/media/web-${process.env.OC_DEV ? "dev" : "release"}`])
console.log(p.stdout.toString(), p.stderr.toString())
break
}
})
}),
)
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.
drakeo338 commented on Oct 16, 2026 I can reproduce this and I'm working on a fix, will open a PR shortly. drakeo338 commented on Oct 23, 2026 Releasing my claim here: my fix waits behind my other open PR, so anyone is welcome to take this one. as992949791 commented on Oct 23, 2026 Picking this up after the released claim. I’ll add a component regression through ToolDisplay and restore the collapsed input/output disclosure for fallback tools. Codex will assist with implementation and tests.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|