Problem
Text output in oclite has two readability issues:
1. Justified Word Spacing
Words are spread across the full terminal width with huge gaps between them, as if text is being justified (like CSS text-align: justify).
2. No Left/Right Margins
Text runs edge-to-edge with no breathing room. Need left and right margins (e.g., 2-4 chars) to make content more readable and visually balanced.
Screenshot
See conversation — the output shows:
Session Initialized ✓ line has huge gaps between words
- Bullet points like
- 2 open PR s : db-setup .sql grants fix... are spread out
- Bold markdown text (
**Key Constraints**) has broken spacing
- Tool output lines have inconsistent spacing
- No margins — text starts at column 0
Expected
- Normal left-aligned text with standard single-space word separation
- Comfortable left/right margins (2-4 characters)
Likely Cause
The wrap.ts or markdown.ts module is applying text justification or incorrect padding when wrapping lines to terminal width.
Key Files
packages/opencode/src/cli/lite/wrap.ts — word wrapping with margins
packages/opencode/src/cli/lite/markdown.ts — streaming markdown renderer
packages/opencode/src/cli/lite/index.ts — output pipeline: write(wrap(pad(md.render(content))))
Acceptance Criteria
Problem
Text output in oclite has two readability issues:
1. Justified Word Spacing
Words are spread across the full terminal width with huge gaps between them, as if text is being justified (like CSS
text-align: justify).2. No Left/Right Margins
Text runs edge-to-edge with no breathing room. Need left and right margins (e.g., 2-4 chars) to make content more readable and visually balanced.
Screenshot
See conversation — the output shows:
Session Initialized ✓line has huge gaps between words- 2 open PR s : db-setup .sql grants fix...are spread out**Key Constraints**) has broken spacingExpected
Likely Cause
The
wrap.tsormarkdown.tsmodule is applying text justification or incorrect padding when wrapping lines to terminal width.Key Files
packages/opencode/src/cli/lite/wrap.ts— word wrapping with marginspackages/opencode/src/cli/lite/markdown.ts— streaming markdown rendererpackages/opencode/src/cli/lite/index.ts— output pipeline:write(wrap(pad(md.render(content))))Acceptance Criteria