Skip to content

Commit cd38bea

Browse files
committed
feat: add warning for excessive term height in Codex
1 parent 09b35a4 commit cd38bea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/server/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ func runServer(ctx context.Context, logger *slog.Logger, argsToPass []string) er
7878
}
7979
if termHeight < 10 {
8080
return xerrors.Errorf("term height must be at least 10")
81+
} else if termHeight > 930 && agentType == AgentTypeCodex {
82+
logger.Warn(fmt.Sprintf("Term height is set to %d which may cause issues with Codex. Setting it to 930 instead.", termHeight))
83+
termHeight = 930 // codex has a bug where the TUI distorts the screen if the height is too large, see: https://github.com/openai/codex/issues/1608
8184
}
8285

8386
var process *termexec.Process

0 commit comments

Comments
 (0)