--- title: Tracking AI-generated code description: Control when to track and indicate that code is AI-generated.Show that the code was generated by AI in script editors for a specified duration after accepting code suggestions.Turn off tracking and indicating which code is AI-generated. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/scripts/tracking-ai-generated-code.html release: australia product: Scripts classification: scripts topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 1 breadcrumb: [Use, ServiceNow Otto for Code, Scripting, API implementation, API implementation and reference] --- # Tracking AI-generated code Control when to track and indicate that code is AI-generated. When you accept a code suggestion, the lines of code that are AI-generated are tracked and indicated by a line next to the line numbers in script editors. If you edit AI-generated code, the line indicator doesn’t appear for those lines of code. You can turn on and off tracking of AI-generated code and configure how long to record and indicate AI-generated code in script editors. By default, AI-generated code is recorded and indicated for six months. ## Configure how long to indicate AI-generated code Show that the code was generated by AI in script editors for a specified duration after accepting code suggestions. ### Before you begin Role required: admin ### Procedure 1. In the navigation filter, enter `sys_auto_flush.list`, and press the Enter key. 2. Filter the Auto Flushes \[sys\_auto\_flush\] list by entering **sn\_now\_assist\_code\_ai\_generated\_lines** in the **Tablename** column filter. 3. Select **sn\_now\_assist\_code\_ai\_generated\_lines** to open the record. 4. In the **Age in seconds** field, enter the duration to record and indicate AI-generated code after its creation in seconds. 5. Select **Update**. ### Result AI-generated code is tracked and indicated. However, AI-generated code created before the configured duration isn’t recorded or indicated in script editors. ## Turn off tracking AI-generated code Turn off tracking and indicating which code is AI-generated. ### Before you begin Role required: admin ### About this task Tracking and indicating which code is AI-generated involves changes that are included in update sets. If you don't want to include changes related to this in update sets, you can turn off tracking and indicating AI-generated code. ### Procedure 1. In the navigation filter, enter `sys_properties.list` and press the Enter key. 2. Filter the System Properties \[sys\_properties\] list by entering **sn\_now\_assist\_code.show\_ai\_code\_line\_marker** in the **Name** column filter. 3. Select **sn\_now\_assist\_code.show\_ai\_code\_line\_marker** to open the property record. 4. In the **Value** field, enter `false`. 5. Select **Update**. ### Result AI-generated code isn’t recorded or indicated in script editors.