Skip to content

[FEATURE]: Add TUI ability to inspect session system messages #24990

Closed as not planned

Description

@emiasims

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

Currently, there is no way to directly inspect or view system messages (such as system prompts, environment info, or initial context details) from the OpenCode TUI during a session. This feature request proposes adding a TUI feature to view the current or previous system message(s) associated with the active session or a selected session.

Benefits:

  • Allows users to verify, debug, and audit what system prompt/context is being provided to the model.
  • Helps troubleshoot session behavior by letting users see key context details (like working directory, platform, custom environment settings, etc.) used in system messages.
  • Improves transparency for users who suspect system context is affecting completions or need to confirm OPENCODE's understanding of environment state.

Suggested implementation:

  • Add a TUI shortcut or command (e.g., /system or a context menu option in the session list) that opens the latest system message for the current session.
  • Optionally support viewing system messages for previous sessions or the full session timeline.
  • Display the exact content of the message (with redaction as needed for sensitive values), formatted for readability.

This would give TUI users parity with API/web users who can already view or export system messages, and is especially helpful for CLI-only workflows.

Extra points for being able to edit them in EDITOR for while that part stays alive, but that could conflict with how it is implemented so probably not super important. But it would be really nice for testing small system message changes.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Apr 29, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 29, 2026
  3. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. e-magon commented on Jun 22, 2026

    @e-magon

    This could help debug problems that happen when changing agent or model during a conversation, for example. It could also help users understand and better learn how LLMs and agentic harnesses work.

  5. Rexarrior commented on Jul 31, 2026

    @Rexarrior

    I opened a related but narrower PR here: #39905

    It does not add a TUI surface, but it adds a CLI debug command for inspecting the resolved effective system prompt:

    opencode debug prompt

    The goal is to make prompt customization easier to debug from the CLI: AGENTS.md, opencode.json instructions, skills, MCP instructions, custom agents, and system prompt plugin transforms.

    This does not replace the TUI request in this issue, but it may cover part of the same debugging/auditing need for CLI workflows.

  6. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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