Skip to content

/copy copies the entire session instead of the latest agent response #27967

Closed as not planned

Description

@ivndya

Description

Description

When using the /copy command, opencode currently copies the entire conversation from the beginning of the session.

I expected /copy to copy only the latest agent response, or at least provide a way to choose what part of the latest response should be copied.

Current behavior

Running /copy copies the whole conversation history from the start of the current session.

This becomes inconvenient in longer sessions because the clipboard contains much more text than needed.

Expected behavior

The /copy command should copy the latest agent response by default, not the entire session.

Additionally, it would be useful to have behavior similar to Claude Code: before copying the response, opencode could ask what exactly should be copied, for example:

  • Copy the entire latest response
  • Copy only a specific section/code block
  • Copy selected text/snippet

Why this would be useful

In many cases, the user wants to copy only the most recent answer, especially when the response contains a command, code block, config snippet, or explanation.

Copying the whole session requires extra manual cleanup and makes /copy less practical in longer conversations.

Suggested behavior

Possible options:

  1. Change /copy default behavior to copy only the latest assistant response.
  2. Add a separate command for the full session, for example:
    • /copy session
    • /copy all
  3. Add an interactive selection flow:
    • Run /copy
    • Prompt the user to choose which part of the latest response to copy

Reference

Claude Code has a useful copy flow where it asks what part of the response should be copied instead of blindly copying the entire conversation.

Plugins

No response

OpenCode version

1.15.1

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04.4 LTS (WSL)

Terminal

Alacritty (Windows)

Activity

  1. github-actions commented on May 17, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This appears to be a feature request, but it does not use the feature request template. The title must start with [FEATURE]: and the issue must include the verification checkbox confirming the feature hasn't been suggested before.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on May 17, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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