Skip to content

[UX]: web/desktop: user shell commands entered with ! are rendered collapsed like agent tool calls; output should be visible by default #58062

Open

Description

@minorcell

Summary

In the web and desktop clients, typing ! switches the composer into shell mode. After running such a command, its result row is collapsed by default (like an agent tool call), so the user has to click to see the output of a command they explicitly ran.

This is poor UX because:

  1. The command is user input, not an agent tool call. The user already knows they ran it and expects to see its result.
  2. Reusing the agent tool-call component (SessionShellMessage / BasicTool shell renderer) makes a user-initiated command look like agent activity.
  3. Under the default compact timeline preset, timelineDetail().shell.details === "collapsed", so user shell command output is hidden until expanded.

Steps to reproduce

  1. Open a session in the web or desktop app.
  2. Type !echo hello (or any command) and submit.
  3. Wait for the command to complete.
  4. Observe that the result row is collapsed; click to expand to see output.

Expected behavior

  • The command and its output should be visible by default, without an extra click.
  • User-initiated shell commands should not inherit the collapse policy of agent shell tool calls (or should have a distinct, expanded-by-default presentation).

Actual behavior

  • The row is collapsed by default under the compact preset.
  • It renders through the same tool-call component as agent shell calls.

Relevant code

  • packages/core/src/session/session.ts — Session.shell creates the SessionMessage.Shell message and publishes Shell.Started / Shell.Ended.
  • packages/session-ui/src/timeline/session-timeline-row.tsx — Shell() computes defaultOpen from input.timelineDetail().shell.details (or shellToolDefaultOpen()), same as agent shell tools.
  • packages/session-ui/src/tools/tool-renderer.tsx — SessionShellMessage renders via ToolRegistry.render("shell") (agent tool-call UI).
  • packages/session-ui/src/timeline/detail.ts — timelineDetail shell category and presets (default compact collapses shell).
  • packages/app/src/session/timeline/controller.tsx — shellToolPartsExpanded drives shellToolDefaultOpen.

Suggestion

Distinguish user-initiated shell messages from agent shell tool parts:

  • Either give user shell messages their own default (expanded) independent of the agent shell collapse setting, or
  • Add a separate timeline category / setting (e.g. userShell) with its own placement/details, or
  • Render user shell commands with a dedicated, non-collapsed component.

This keeps the existing agent shell tool collapse behavior intact while making user-run commands readable.

Activity

  1. opencode-agent commented on Oct 22, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up, @minorcell!

    You're asking for commands you run yourself with ! in the web/desktop composer to show their output by default, and to stop following the collapse setting for agent shell tool calls. That could be done with a separate default, a separate timeline category such as userShell, or a dedicated, always-expanded component.

    Right now this is by design: user shell messages use the shell timeline category, so they follow its setting. The compact preset collapses shell rows, and the more detailed presets show them expanded. Because of that, I've filed this as a feature request rather than a bug. Maintainers will consider it.

    Related issues:

    In the meantime, switching the timeline preset to one that shows shell rows expanded will display the output without an extra click. The catch is that agent shell calls will be expanded too.

  2. minorcell commented on Oct 22, 2026

    @minorcell
    Author

    @opencode-agent

    So, what do you think about this? Should we add a toggle in the settings? I expect this to be fixed in the next version.

  3. minorcell commented on Oct 22, 2026

    @minorcell
    Author

    To say casually, the desktop apps for Claude code or Codex have separate simulated terminal entries, which is also a good experience way.

  4. minorcell commented on Oct 22, 2026

    @minorcell
    Author

    @thdxr Hello, it seems many people are discussing this issue. I'd like to know how the official team views this problem?

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