Bug Description
The /resume and hermes sessions list commands render session tables using Python str.format() fixed-width formatting ({var:<32}), which assumes every character occupies one terminal column. CJK characters (Chinese, Japanese, Korean) are double-width in modern terminals, causing severe misalignment.
Example Output (broken)
# Title Preview Last Active ID
─── ──────────────────────────────── ──────────────────────────────────────── ───────────── ────────────────────────
2 整理论文和更新README #4 我更新了paper/和 … 6d ago 20260604_195221_254cc9
Notice how the Preview, Last Active, and ID columns are shifted right because the Chinese characters in Title and Preview take 2 terminal columns each but Python counts them as 1.
Affected Code Paths
cli.py — HermesCLI._show_recent_sessions() (the /resume inline list)
hermes_cli/main.py — cmd_sessions() list action (the hermes sessions list CLI command)
Both use the same print(f"{var:<N}") pattern that does not account for double-width characters.
Expected Behavior
- Columns should be properly aligned regardless of CJK characters in titles/previews.
- Using
rich.table.Table (which the project already depends on) handles CJK display widths correctly.
- Consider moving Last Active and ID to the left side so variable-length content (Title/Preview) on the right doesn't push them out of alignment.
Environment
- Hermes version: main branch as of 2026-06-11
- OS: Windows 10 (also affects any terminal with CJK text)
- Terminal: any modern terminal emulator with Unicode support
Bug Description
The
/resumeandhermes sessions listcommands render session tables using Pythonstr.format()fixed-width formatting ({var:<32}), which assumes every character occupies one terminal column. CJK characters (Chinese, Japanese, Korean) are double-width in modern terminals, causing severe misalignment.Example Output (broken)
Notice how the Preview, Last Active, and ID columns are shifted right because the Chinese characters in Title and Preview take 2 terminal columns each but Python counts them as 1.
Affected Code Paths
cli.py—HermesCLI._show_recent_sessions()(the/resumeinline list)hermes_cli/main.py—cmd_sessions()list action (thehermes sessions listCLI command)Both use the same
print(f"{var:<N}")pattern that does not account for double-width characters.Expected Behavior
rich.table.Table(which the project already depends on) handles CJK display widths correctly.Environment