MCPcopy Index your code
hub / github.com/github/copilot-sdk / _stderr_loop

Method _stderr_loop

python/copilot/_jsonrpc.py:108–122  ·  view source on GitHub ↗

Read stderr in background to capture error messages

(self)

Source from the content-addressed store, hash-verified

106 self._stderr_thread.start()
107
108 def _stderr_loop(self):
109 """Read stderr in background to capture error messages"""
110 try:
111 while self._running:
112 if not self.process.stderr:
113 break
114 line = self.process.stderr.readline()
115 if not line:
116 break
117 stderr_line = line.decode("utf-8") if isinstance(line, bytes) else line
118 logger.warning("[CLI] %s", stderr_line.rstrip())
119 with self._stderr_lock:
120 self._stderr_output.append(stderr_line)
121 except Exception:
122 logger.debug("Error reading Copilot CLI stderr", exc_info=True)
123
124 def get_stderr_output(self) -> str:
125 """Get captured stderr output"""

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
readlineMethod · 0.45

Tested by

no test coverage detected