Skip to content

[New] Terminate GenAI Process Activity - #159

Open
Mikaayenson wants to merge 7 commits into
elastic:mainfrom
Mikaayenson:feat/terminate-genai-process
Open

Mikaayenson wants to merge 7 commits into
elastic:mainfrom
Mikaayenson:feat/terminate-genai-process

Conversation

@Mikaayenson

@Mikaayenson Mikaayenson commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Use this when an AI coding agent or one of its child processes is doing something you need stopped on an endpoint (for example a runaway tool call, unexpected shell activity, or a descendant process tied to Cursor, Claude Code, Copilot, Ollama, and similar). The workflow terminates that process with Elastic Defend kill_process, but only when process.ai_agent.name is set or process.ai_agent.is_descendant is true, so ordinary host processes are skipped. Those fields need Elastic Endpoint Linux 9.5+ (macOS and Windows 9.6+) with AI event enrichment enabled (Linux on by default in 9.5; Defend AI data collection / advanced genai_observability elsewhere). Start from a security alert or run it manually (manual runs can pass ai_agent_name / ai_agent_is_descendant). It prefers process.entity_id; PID-only enforce is refused because of PID reuse risk. Audit by default; enforce submits the kill, polls until Defend finishes, and records whether it succeeded. Optional host isolate is a separate install toggle and runs only after a verified kill.

terminate-genai-process__outcome-step terminate-genai-process__outcome-skip terminate-genai-process__outcome-pid-refuse terminate-genai-process__outcome-entity-kill

@Mikaayenson
Mikaayenson requested a review from a team as a code owner November 21, 2026 02:58
@github-actions
github-actions Bot requested a review from h88 November 21, 2026 02:58
…urce isolation, outcome truthiness, isolate log

@h88 h88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 minor generated comments, unblocking...

Remove unused action_poll_limit after the literal poll limit change, note the
history privilege needed for verification, and include kill_process errors in
the summarize message.
Comment thread .gitignore Resolved
@Mikaayenson
Mikaayenson requested a review from h88 December 1, 2026 21:32
@Mikaayenson Mikaayenson self-assigned this Dec 2, 2026
@Mikaayenson
Mikaayenson enabled auto-merge (squash) December 2, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants