Repository navigation
Description
A session running with permission prompting disabled looks exactly like a
supervised one in the trail.
initiator.actor_type exists to carry this distinction and cannot. It is
derived in core/audit/run_context.py from the call site (manual, cron,
vault_watch, ingress), which is the right design for the orchestrator's own
runs and says nothing about an IDE session. Every hook-captured session
therefore records actor_type: human, trigger: manual, whether a person
approved each tool call or the agent was launched with approvals switched off
and ran unattended for an hour.
The nearest thing the trail has is reason: inferred:tool_ran_after_ask,
reconstructed after the fact from a tool executing following an ask. That
records a consequence of unattended mode. It does not record the mode, it cannot
fire until damage is already done, and it says nothing at session start.
Why it is worth a field of its own
Every severity judgement in this product implicitly assumes a human was in the
loop. destructive-delete-burst at 3pm with someone approving each step is a
developer clearing a build directory. The same burst with approvals disabled is
an unsupervised process deleting files nobody watched. Same events, same rule,
different incident, and the trail cannot tell an investigator which one happened.
It is also the field a SOC would alert on directly, before any rule fires: an
unattended agent session starting on a production machine is worth knowing about
at SessionStart, not at the first destructive tool call.
What to capture
At SessionStart, and stamped onto the session's events:
- Whether permission prompting is disabled.
--dangerously-skip-permissionsis
the documented flag for Claude Code, and Cursor has its own auto mode, so this
needs one detector per capture surface rather than one string match. - The launch flags of the agent process, from process ancestry, recorded as a
category rather than a command line. The same redaction rule as everywhere
else: a flag list can contain paths and tokens. - A three-state value, not a boolean.
supervised,unattended,unknown. An
unknown that reads assupervisedis the failure that matters, and this repo
has already been bitten once by a default that quietly meant "fine".
Proposed: session.execution_mode, additive, so schema 1.2.0 stands.
Deliberately out of scope here
No detection rule. A rule keying on execution_mode belongs in
rules.py/traits.py, both frozen until the dogfood clock closes, earliest
2026-09-26. Landing the capture now means the field is populated and proven on
real sessions by the time a rule can use it, which is the right order anyway: a
rule written against a field nobody has collected is a guess.
No enforcement change. AGENTMETRY_ENFORCE already denies on
beforeShellExecution, beforeMCPExecution, preToolUse and subagentStart
(hooks/ingest.py:1375). Whether an unattended session should get a stricter
default policy is a real question and a separate one. Record first.
Scope
hooks/ingest.py and the session-start path. Additive to the schema. Nothing
under the detection freeze.
Activity
ozereray commentedon Sep 13, 2026
This is a really important distinction for agent security: the same tool events can mean very different things depending on whether a human is actually supervising the session.
What I find useful is treating execution mode as part of the authorization context rather than just another telemetry field:
agent identity -> execution mode -> policy decision -> tool action -> evidence.
If a session is genuinely unattended, that context should still be present when the enforcement decision is made. Otherwise an audit trail can accurately record the event while still missing the fact that the action happened outside the expected human-control model.
At Aegisora we're exploring this as part of the execution boundary with explicit ALLOW / BLOCK / ESCALATE decisions and evidence binding around agent, tool, decision and execution.
Your proposal to capture session.execution_mode at SessionStart is interesting for exactly that reason. I'd be curious whether you'd eventually want execution mode to become an input to the enforcement policy itself, not only something downstream detectors consume.
blitzcrieg1 commentedon Sep 13, 2026
Yes, and it is closer than the issue makes it sound. Enforcement already exists here, it just is not wired to execution mode yet.
Worth being precise, because there are two surfaces in this project with different powers and conflating them is how people end up trusting the wrong one.
core/audit/policy.pycannot block, by design. By the time an event reaches the ingest API the tool has already run, so a verdict there is an annotation and nothing more. It carriesenforced: falsein its own block specifically so nobody reads it as prevention. An earlier version setaction.outcome = "denied"on events that had already executed, which put a lie in the trail and simultaneously blinded every detector keying onoutcome == "success".The hook path can block, because the IDE waits on it. With
AGENTMETRY_ENFORCEset, the hook emits{"permission": "deny"}on the genuinely pre-execution hooks:beforeShellExecution,beforeMCPExecution,preToolUseandsubagentStart, plusPreToolUseandPermissionRequest. DLPblockmode already uses that path. So the ALLOW / BLOCK shape exists, and ESCALATE maps ontoask, which those hooks also accept.So to answer directly: yes, I would want execution mode as an input to that decision, and the piece that is missing is the input rather than the mechanism.
I scoped this issue to capture only for a boring reason. A rule or trait keying on execution mode lives in files that are frozen while a four week evaluation clock runs, and breaking that freeze to add a field would restart a gate whose whole point is that it was measured against one ruleset. Capturing now means the field is populated and proven on real sessions before anything depends on it, which is the right order anyway. A policy written against a field nobody has collected is a guess.
The part I would push back on in your design as much as mine: the moment execution mode becomes an input to an authorization decision, it becomes worth forging.
--dangerously-skip-permissionsis a launch flag, so it can be read from process ancestry, which the session cannot rewrite. But anything the session asserts about itself is a one field bypass. I got this wrong in a neighbouring issue here: I proposed keying MCP server baselines onclientInfo, and a reviewer pointed out it is self asserted and unauthenticated, so a hostile server just sends a different string and gets a fresh baseline. Same trap.Which is why this issue asks for three states rather than a boolean:
supervised,unattended,unknown. An unknown that silently reads assupervisedis the failure that matters, because it makes the permissive answer the default when the signal is missing or suppressed. If execution mode is going to gate enforcement,unknownprobably has to fail closed, and that is a harder product conversation than it looks.Happy to compare notes on how you derive it. The derivation is the whole problem. The field is easy.