Skip to content

[FEATURE]: Explicit setting to keep shell output and error/failed output collapsed #55089

Closed as not planned

Description

@byJming

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

Both error output and shell output render expanded in my client, and I want an explicit, easy-to-find, persistent choice to keep them collapsed instead of being locked into a default-expanded state.

Findings from the source (dev, 2026-10-13):

  • Error / failed output has no user-facing setting. The timeline display policy (packages/session-ui/src/timeline/detail.ts) only defines a details: collapsed | expanded field for shell, edit and thinking. There is no errors / failures category, and the settings UI (packages/app/src/settings/timeline-detail.tsx) only renders the "Collapse" switch for those three categories. Error output expansion is therefore decided entirely by hard-coded rules (see below) and cannot be configured.
  • Failures reported through metadata are not handled as errors. A shell command with a non-zero exit code (shellResultFailed) and Code Mode execute failures (executeToolFailed) keep state.status === "completed", so they do not take the error branch of currentContentDefaultOpen() (packages/session-ui/src/message/current-tool-state.ts) and instead inherit the shell/execute expansion. In addition, SessionShellMessage (packages/session-ui/src/tools/tool-renderer.tsx) always renders a ToolErrorCard for a non-zero exit, independent of the collapse setting.
  • The TUI only has transient controls. /details, the tool_details keybind, session.tool_details and the tool_expand_output keybind (feat(tui): add keybind to expand/collapse tool output blocks #52725) are not persisted as a config default, and there is no control for error/failed output at all.

This area has been a recurring source of issues and PRs: #17003 (error tool cards did not respect the expand setting), #6908, #7286, #11942, #34246, #42552, #49474, #52725, plus the still-open #45538 / #45872 / #51229.

Proposal

Make expanded/collapsed a persistent, explicit, per-category default that includes error/failed output, so users can choose (and keep) a compact view.

  1. Desktop / web: add an errors / failures category to the timeline display policy (packages/session-ui/src/timeline/detail.ts) with its own details: collapsed | expanded default and a matching "Collapse" switch in the advanced settings, and make metadata-reported failures (shell non-zero exit, Code Mode execute failure) follow it instead of the shell/execute expansion. Illustrative shape:
    {
      "timeline": {
        "shell": { "placement": "separate", "details": "collapsed" },
        "errors": { "placement": "separate", "details": "collapsed" }
      }
    }
  2. TUI: add a persistent config default (e.g. under tui.json / cli.json) covering shell output and error/failed output, mirroring the existing session.tool_details / session.thinking options. Illustrative shape:
    {
      "session": {
        "tool_details": "collapse",
        "error_output": "collapse"
      }
    }
  3. Keep expanded/collapsed a per-item click/toggle layered on top of the default, and preserve the current defaults for anyone who does not opt in.

Benefits

  • Users can keep successful tool activity and error output compact, or expand everything — their choice, persisted across sessions and set independently per category.
  • Removes the inconsistency where error output follows hard-coded logic or the shell setting instead of the user's display preferences (App: error tool cards do not respect 'expand tool' setting #17003).
  • Consolidates the many ad-hoc toggles into one predictable, documented policy per client.

Alternatives considered

Related

#35193, #45538, #45872, #51229, #51308, #49088, #54515, #17003 and PRs #52725 / #42552 / #34246.

Activity

  1. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up and for tracing it through the source! To restate the request: you'd like a saved, per-category collapsed/expanded default that also covers error and failed output. On desktop/web that would be an errors category in the timeline display settings. Shell commands that exit non-zero and failed Code Mode execute calls would follow that setting instead of the shell setting. In the TUI it would be a config default for shell and error output. Clicking an item would still expand or collapse it.

    The maintainers will consider it. Related open requests that overlap with parts of this:

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