What Shield KYA’s Audit Log Shows About AI Coding Agent Decisions

Coding agents can inherit access to a developer’s shell, files and accounts. When something goes wrong, knowing what the agent requested and which control intervened can speed up the investigation. Shield KYA is an MIT-licensed tool for recording those decisions and blocking certain calls.

Founder Ionut Tudoreanu told DaySec that the idea came from more than a decade in banking technology, where production changes had an owner and an audit trail. He plans to expand host support and improve the default rules and what developers can see in the record.

In Claude Code, KYA uses a PreToolUse hook to inspect calls before they execute. Its default rules cover selected destructive operations and credential access. It writes its decisions to ~/.kya/trail.jsonl without requiring an account. In Cursor, visibility depends on which calls go through KYA’s MCP gateway.

How to read a KYA decision

Tudoreanu supplied three anonymized records from version 0.35.7. Each identifies the tool and gives a reason code. The denied sample names the matching KYA rule. For the shell calls, the record gives the command name, argument count and argument hash.

Sample action KYA verdict Logged outcome
Read a project README ALLOW ran
Request to delete the home directory recursively DENY blocked
Request to publish an npm package REQUIRE_APPROVE ran
Selected fields from three demo records supplied by Shield KYA’s founder. DaySec did not run these tests.

The third sample pairs REQUIRE_APPROVE with ran: KYA flagged the call and let it proceed in local observe mode. Because the hook runs before execution, the host’s tool result is still needed to confirm completion. Claude Code’s native permissions and other hooks need separate evidence.

The local hook denies REQUIRE_APPROVE calls in --strict mode. Without strict mode, certain database operations can trigger Claude Code’s own permission prompt through the guard pack. KYA records that handoff as held with reason code GUARD_ASK. In 0.35.7, the local hook can also log held for an advisory verdict that strict mode denies. Check the reason code and hook mode alongside the logged outcome.

How teams can use the record

For a developer, the Activity view can help explain why a command was blocked. An incident responder can use the timestamps and session IDs to line up KYA’s decisions with host logs. The Certify report checks local evidence against Shield KYA’s own baseline. A passing result reflects the evidence available to that check.

The default local hook fails open. If it fails, the host continues through its permission flow. Ordinary project edits and deletions can be logged and still proceed. Process isolation remains the job of the host or operating system.

In 0.35.7 the hosted hook preview supports Claude Code, with Windows support still pending. In enforcing mode, the hook denies the call if the workspace is unreachable or fails to return a valid decision in time. Strict mode also denies a workspace REQUIRE_APPROVE without creating an approval request. Hosted human approvals use the workspace’s MCP policy path or kya wrap --hold.

Shield KYA Certify dashboard showing passed checks, gaps and insufficient evidence in a demo
Shield KYA Certify report with demo evidence. Image: Shield KYA.

Latest articles

Related articles