# `LlmCore.Executor.Control`
[🔗](https://github.com/fosferon/llm_core/blob/v0.9.4/lib/llm_core/execution/control.ex#L1)

Minimal execution control registry used by CLI providers to support HALT semantics.

Consumers that need richer state management can override these functions
or provide their own module via dependency injection, but the defaults keep
track of active ports so they can be cleaned up when executions end.

# `clear_active`

```elixir
@spec clear_active(term()) :: :ok
```

Removes the active port registration for the given execution ID.

# `lookup`

```elixir
@spec lookup(term()) :: {:ok, port()} | :error
```

Looks up the active port for the given execution ID.

Returns `{:ok, port}` if found, `:error` otherwise.

# `set_active_port`

```elixir
@spec set_active_port(term(), port()) :: :ok
```

Registers a port as the active process for the given execution ID.

The execution ID is any term; callers commonly use a binary, but HALT must
work for whatever key the consumer uses.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
