Skip to content

Raise terminal history/scrollback/buffer defaults (50k→100k, 2MB→32MB)#138

Open
aakhter wants to merge 1 commit into
Ark0N:masterfrom
aakhter:cod-80-raise-terminal-defaults
Open

Raise terminal history/scrollback/buffer defaults (50k→100k, 2MB→32MB)#138
aakhter wants to merge 1 commit into
Ark0N:masterfrom
aakhter:cod-80-raise-terminal-defaults

Conversation

@aakhter

@aakhter aakhter commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Raises the centralized terminal-history defaults introduced in #137:

value before (#137) this PR
tmux history-limit 50,000 100,000
terminal scrollback lines 50,000 100,000
PTY buffer max 2 MB 32 MB
PTY buffer trim 1.5 MB 24 MB

All values remain env- and settings-overridable (CODEMAN_MAX_TERMINAL_BUFFER / CODEMAN_TRIM_TERMINAL_TO) and bounds-clamped via resolveTerminalHistoryConfig().

Why split from #137

#137 introduced the config mechanism with no behavior change (defaults kept at the prior hardcoded values), so the plumbing could be reviewed on its own. This PR is the follow-up policy change: larger defaults so a full default scrollback is retained and replayable. Keeping them separate lets the larger memory budget be weighed independently.

Trade-off

Worst-case terminal-buffer budget for 20 concurrent sessions rises 40 MB → 640 MB (comment updated to match). Operators who want the smaller footprint can set CODEMAN_MAX_TERMINAL_BUFFER / CODEMAN_TRIM_TERMINAL_TO.

Tests

test/terminal-history.test.ts updated to assert the raised defaults; tsc --noEmit, the terminal-history + schema tests, and npm run build all pass.

Bump the centralized terminal-history defaults: tmux scrollback 50k->100k and
PTY buffer cap 2MB->32MB (trim 1.5MB->24MB). Both remain env/settings overridable
and bounds-clamped. Worst-case 20-session buffer budget rises 40MB->640MB.
Stacked on the terminal-history config commit.
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.

1 participant