Skip to content

fix(cli): add missing trailing newline to stderr output#33367

Open
aslobodeniuk wants to merge 1 commit into
anomalyco:devfrom
aslobodeniuk:session-eol-fix
Open

fix(cli): add missing trailing newline to stderr output#33367
aslobodeniuk wants to merge 1 commit into
anomalyco:devfrom
aslobodeniuk:session-eol-fix

Conversation

@aslobodeniuk

@aslobodeniuk aslobodeniuk commented Jun 22, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #33370

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Just adding a missing newline if it's not there. Yes the fix was done by the AI, and we can argue if it's the right place.
It could also be the missing newline in the actual "session" command, but assuming opencode is widely coded with AI (would be too ironic otherwise) the fix seems fair in a sake of "autoprotection".

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

packages/opencode$ dist/opencode-linux-x64/bin/opencode session

Screenshots / recordings

Here's the screenshot of "after the fix" command and then "before the fix" command:

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

There are two related PRs that address similar trailing newline issues:

  1. PR fix(opencode): add trailing newline to CLI help output #29898 - fix(opencode): add trailing newline to CLI help output

  2. PR fix(opencode): add trailing newline to help output #30547 - fix(opencode): add trailing newline to help output

Why they're related: These PRs all target the same root issue of missing trailing newlines in CLI output (stderr/stdout). The current PR (#33367) addresses stderr output specifically, while the older PRs address help output. It's worth checking if these previously merged fixes should have already covered this issue, or if this is a different code path that still needs the fix.

When I run

opencode session

it's missing a newline in the end of the output,
and confuses my terminal
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"opencode session" is missing a new line

1 participant