{"type":"begin","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"}}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._compact_cancel_requested = False\n"},"line_number":308,"absolute_offset":10880,"submatches":[{"match":{"text":"cancel"},"start":22,"end":28}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._pending_exit_after_compact_cancel = False\n"},"line_number":309,"absolute_offset":10927,"submatches":[{"match":{"text":"cancel"},"start":41,"end":47}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._plugin_init_cancel_timeout_s = 1.0\n"},"line_number":399,"absolute_offset":15045,"submatches":[{"match":{"text":"cancel"},"start":26,"end":32}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._mcp_init_cancel_timeout_s = read_env_float(\n"},"line_number":423,"absolute_offset":16176,"submatches":[{"match":{"text":"cancel"},"start":23,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._exit_guard_active = False\n"},"line_number":509,"absolute_offset":19795,"submatches":[{"match":{"text":"_exit_guard_active"},"start":13,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            filter=Condition(lambda: self._exit_guard_active),\n"},"line_number":695,"absolute_offset":27424,"submatches":[{"match":{"text":"_exit_guard_active"},"start":42,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        return self._ui_mode == mode and not self._exit_guard_active\n"},"line_number":842,"absolute_offset":34252,"submatches":[{"match":{"text":"_exit_guard_active"},"start":50,"end":68}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        if getattr(self, \"_exit_guard_active\", False):\n"},"line_number":849,"absolute_offset":34558,"submatches":[{"match":{"text":"_exit_guard_active"},"start":26,"end":44}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                controller.cancel_for_mode_change()\n"},"line_number":881,"absolute_offset":36009,"submatches":[{"match":{"text":"cancel"},"start":27,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    def _cancel_pending_tool_approval(self, reason: str | None = None) -> None:\n"},"line_number":997,"absolute_offset":40509,"submatches":[{"match":{"text":"cancel"},"start":9,"end":15}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        if getattr(self, \"_exit_guard_active\", False):\n"},"line_number":1038,"absolute_offset":42153,"submatches":[{"match":{"text":"_exit_guard_active"},"start":26,"end":44}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    def _cancel_idle_recap_for_input_activity(self) -> None:\n"},"line_number":1048,"absolute_offset":42448,"submatches":[{"match":{"text":"cancel"},"start":9,"end":15}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            controller.cancel_for_input_activity()\n"},"line_number":1053,"absolute_offset":42694,"submatches":[{"match":{"text":"cancel"},"start":23,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._cancel_idle_recap_for_input_activity()\n"},"line_number":1103,"absolute_offset":44859,"submatches":[{"match":{"text":"cancel"},"start":14,"end":20}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                controller.cancel_for_busy()\n"},"line_number":1519,"absolute_offset":61214,"submatches":[{"match":{"text":"cancel"},"start":27,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            buffer.cancel_completion()\n"},"line_number":1663,"absolute_offset":67185,"submatches":[{"match":{"text":"cancel"},"start":19,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            buffer.cancel_completion()\n"},"line_number":1809,"absolute_offset":72489,"submatches":[{"match":{"text":"cancel"},"start":19,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                self._maybe_cancel_tool_result_flash(event)\n"},"line_number":1971,"absolute_offset":78999,"submatches":[{"match":{"text":"cancel"},"start":28,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                    and not getattr(self, \"_exit_guard_active\", False)\n"},"line_number":2057,"absolute_offset":83753,"submatches":[{"match":{"text":"_exit_guard_active"},"start":43,"end":61}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    def _maybe_cancel_tool_result_flash(self, event: object) -> None:\n"},"line_number":2199,"absolute_offset":90836,"submatches":[{"match":{"text":"cancel"},"start":15,"end":21}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                future.cancel()\n"},"line_number":2339,"absolute_offset":96020,"submatches":[{"match":{"text":"cancel"},"start":23,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            or getattr(self, \"_exit_guard_active\", False)\n"},"line_number":2364,"absolute_offset":96939,"submatches":[{"match":{"text":"_exit_guard_active"},"start":30,"end":48}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._pending_exit_after_compact_cancel = True\n"},"line_number":2606,"absolute_offset":106570,"submatches":[{"match":{"text":"cancel"},"start":45,"end":51}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            if not self._compact_cancel_requested:\n"},"line_number":2607,"absolute_offset":106629,"submatches":[{"match":{"text":"cancel"},"start":33,"end":39}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                self._compact_cancel_requested = True\n"},"line_number":2608,"absolute_offset":106680,"submatches":[{"match":{"text":"cancel"},"start":30,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                self._compact_task.cancel()\n"},"line_number":2613,"absolute_offset":106933,"submatches":[{"match":{"text":"cancel"},"start":35,"end":41}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                    \"/compact cancellation already requested. Waiting for rollback to finish.\",\n"},"line_number":2616,"absolute_offset":107049,"submatches":[{"match":{"text":"cancel"},"start":30,"end":36}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        if getattr(self, \"_exit_guard_active\", False):\n"},"line_number":2621,"absolute_offset":107257,"submatches":[{"match":{"text":"_exit_guard_active"},"start":26,"end":44}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._close_exit_guard()\n"},"line_number":2628,"absolute_offset":107677,"submatches":[{"match":{"text":"_close_exit_guard"},"start":17,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._open_exit_guard(running, idle_count, source=normalized_source)\n"},"line_number":2633,"absolute_offset":107875,"submatches":[{"match":{"text":"_open_exit_guard"},"start":17,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    def _open_exit_guard(\n"},"line_number":2659,"absolute_offset":108915,"submatches":[{"match":{"text":"_open_exit_guard"},"start":8,"end":24}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._exit_guard_active = True\n"},"line_number":2697,"absolute_offset":110080,"submatches":[{"match":{"text":"_exit_guard_active"},"start":13,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            controller.cancel_for_mode_change()\n"},"line_number":2702,"absolute_offset":110328,"submatches":[{"match":{"text":"cancel"},"start":23,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    def _close_exit_guard(self) -> None:\n"},"line_number":2713,"absolute_offset":110659,"submatches":[{"match":{"text":"_close_exit_guard"},"start":8,"end":25}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._exit_guard_active = False\n"},"line_number":2714,"absolute_offset":110700,"submatches":[{"match":{"text":"_exit_guard_active"},"start":13,"end":31}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._close_exit_guard()\n"},"line_number":2724,"absolute_offset":111125,"submatches":[{"match":{"text":"_close_exit_guard"},"start":17,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                \"TUI exit guard cancelled: source=%s\",\n"},"line_number":2729,"absolute_offset":111293,"submatches":[{"match":{"text":"cancel"},"start":32,"end":38}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._close_exit_guard()\n"},"line_number":2732,"absolute_offset":111403,"submatches":[{"match":{"text":"_close_exit_guard"},"start":17,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._event_pump_task.cancel()\n"},"line_number":2756,"absolute_offset":112481,"submatches":[{"match":{"text":"cancel"},"start":34,"end":40}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"    async def _cancel_task_with_timeout(\n"},"line_number":2760,"absolute_offset":112599,"submatches":[{"match":{"text":"cancel"},"start":15,"end":21}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        task.cancel()\n"},"line_number":2767,"absolute_offset":112763,"submatches":[{"match":{"text":"cancel"},"start":13,"end":19}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            logger.error(f\"{task_name} did not exit within {timeout_s:.1f}s after cancellation\")\n"},"line_number":2770,"absolute_offset":112877,"submatches":[{"match":{"text":"cancel"},"start":82,"end":88}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            logger.warning(f\"{task_name} failed after cancellation: {exc}\", exc_info=True)\n"},"line_number":2777,"absolute_offset":113120,"submatches":[{"match":{"text":"cancel"},"start":54,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            await self._cancel_task_with_timeout(\n"},"line_number":2783,"absolute_offset":113410,"submatches":[{"match":{"text":"cancel"},"start":24,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            old_auto_title.cancel()\n"},"line_number":2793,"absolute_offset":113813,"submatches":[{"match":{"text":"cancel"},"start":27,"end":33}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            event_pump_task.cancel()\n"},"line_number":2859,"absolute_offset":116536,"submatches":[{"match":{"text":"cancel"},"start":28,"end":34}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            auto_title.cancel()\n"},"line_number":2862,"absolute_offset":116675,"submatches":[{"match":{"text":"cancel"},"start":23,"end":29}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"        self._cancel_pending_tool_approval(close_reason)\n"},"line_number":2874,"absolute_offset":117119,"submatches":[{"match":{"text":"cancel"},"start":14,"end":20}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            await self._cancel_task_with_timeout(\n"},"line_number":2883,"absolute_offset":117547,"submatches":[{"match":{"text":"cancel"},"start":24,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                timeout_s=getattr(self, \"_plugin_init_cancel_timeout_s\", 1.0),\n"},"line_number":2885,"absolute_offset":117631,"submatches":[{"match":{"text":"cancel"},"start":54,"end":60}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            await self._cancel_task_with_timeout(\n"},"line_number":2890,"absolute_offset":117860,"submatches":[{"match":{"text":"cancel"},"start":24,"end":30}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                timeout_s=self._mcp_init_cancel_timeout_s,\n"},"line_number":2892,"absolute_offset":117947,"submatches":[{"match":{"text":"cancel"},"start":41,"end":47}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            self._ui_tick_task.cancel()\n"},"line_number":2897,"absolute_offset":118149,"submatches":[{"match":{"text":"cancel"},"start":31,"end":37}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"            startup_status_refresh_task.cancel()\n"},"line_number":2906,"absolute_offset":118470,"submatches":[{"match":{"text":"cancel"},"start":40,"end":46}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                    profiler.mark(\"plugins.init.cancelled\")\n"},"line_number":2952,"absolute_offset":120091,"submatches":[{"match":{"text":"cancel"},"start":48,"end":54}]}}
{"type":"match","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"lines":{"text":"                        self._exit_source = \"run_async_cancelled\"\n"},"line_number":3055,"absolute_offset":124409,"submatches":[{"match":{"text":"cancel"},"start":55,"end":61}]}}
{"type":"end","data":{"path":{"text":"/home/hyc/projects/agent-sdk/packages/comate_cli/comate_cli/terminal_agent/tui.py"},"binary_offset":null,"stats":{"elapsed":{"secs":0,"nanos":253784,"human":"0.000254s"},"searches":1,"searches_with_match":1,"bytes_searched":134766,"bytes_printed":17484,"matched_lines":56,"matches":56}}}
{"data":{"elapsed_total":{"human":"0.001365s","nanos":1365026,"secs":0},"stats":{"bytes_printed":17484,"bytes_searched":134766,"elapsed":{"human":"0.000254s","nanos":253784,"secs":0},"matched_lines":56,"matches":56,"searches":1,"searches_with_match":1}},"type":"summary"}
