the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix: silence embedded libghostty-vt logs
Can Celik26ec677193ef
diff --git a/.codex b/.codexnew file mode 100644index 000000000..e69de29bbdiff --git a/scripts/test_vendor_libghostty_vt.py b/scripts/test_vendor_libghostty_vt.pyindex 9a9806b3b..7fbea8ae5 100644--- a/scripts/test_vendor_libghostty_vt.py+++ b/scripts/test_vendor_libghostty_vt.py@@ -45,6 +45,14 @@ class VendorLibghosttyVtTests(unittest.TestCase):self.assertIn('"dist_archive"', text)self.assertIn('"extracted_dir"', text)+ def test_embedded_libghostty_logging_is_silenced(self) -> None:+ root = Path(__file__).resolve().parent.parent / "vendor" / "libghostty-vt"+ lib_vt = root / "src" / "lib_vt.zig"+ text = lib_vt.read_text()+ self.assertIn("fn silentLog(", text)+ self.assertIn(".log_level = .err", text)+ self.assertIn(".logFn = silentLog", text)+if __name__ == "__main__":unittest.main()diff --git a/vendor/libghostty-vt/src/lib_vt.zig b/vendor/libghostty-vt/src/lib_vt.zigindex adfb11478..9f5ee6c43 100644--- a/vendor/libghostty-vt/src/lib_vt.zig+++ b/vendor/libghostty-vt/src/lib_vt.zig@@ -242,6 +242,18 @@ comptime {}}+fn silentLog(+ comptime level: std.log.Level,+ comptime scope: @Type(.enum_literal),+ comptime format: []const u8,+ args: anytype,+) void {+ _ = level;+ _ = scope;+ _ = format;+ _ = args;+}+pub const std_options: std.Options = options: {if (builtin.target.cpu.arch.isWasm()) break :options .{// Wasm builds we specifically want to optimize for space with small@@ -256,10 +268,13 @@ pub const std_options: std.Options = options: {.logFn = @import("os/wasm/log.zig").log,};- // For everything else we currently use defaults. Longer term I'm- // SURE this isn't right (e.g. we definitely want to customize the log- // function for the C lib at least).- break :options .{};+ // Embedded libghostty-vt runs inside herdr's TUI process. Writing logs to+ // stdout/stderr corrupts the ratatui surface, so silence library-side Zig+ // logging by default for the C library build.+ break :options .{+ .log_level = .err,+ .logFn = silentLog,+ };};test {