Skip to content

V2 TUI: URL truncation in tool calls hides the hostname #55235

Open

Description

@yoshi-taka

Description

In OpenCode V2 TUI, long URLs in tool call summaries are truncated in the middle, sometimes hiding the entire hostname.
For example:
fetch [method=GET, url=https://ra...0.0/code/lib/cli/src/generate.ts]

This makes it impossible to determine which domain the agent is accessing without inspecting the full tool call.
Expected behavior
URL truncation should preserve the scheme and hostname, even when the available display width is limited.
For example:
fetch [method=GET, url=https://raw.githubusercontent.com/.../generate.ts]

The hostname is particularly important for understanding and auditing the agent's network activity.
Actual behavior
The URL is truncated without regard to its structure, potentially hiding the hostname while preserving less important portions of the path.
Related issues

Plugins

No response

OpenCode version

opencode v2.0.28

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS

Terminal

No response

Activity

  1. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for the report, @yoshi-taka, and for the screenshot!

    To restate the request: when a tool-call summary line in the V2 TUI is too long, long URLs should be shortened in a way that keeps the scheme and hostname. For example, https://raw.githubusercontent.com/.../generate.ts rather than https://ra...0.0/code/lib/cli/src/generate.ts. That way you can always see which domain the agent is accessing.

    I looked at the code. In v2.0.28 the summary line is built as tool [key=value, ...], and if it's too wide the whole line gets cut in the middle. That cut doesn't know there's a URL in it, so the hostname can end up hidden. The same behavior is still on the current main branch. Maintainers will consider making this URL-aware.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions