Skip to content

routine: event-tool-parameters (2026-05-29)#22

Draft
jim4226 wants to merge 1 commit into
mainfrom
claude/daily-2026-05-29-event-tool-parameters
Draft

routine: event-tool-parameters (2026-05-29)#22
jim4226 wants to merge 1 commit into
mainfrom
claude/daily-2026-05-29-event-tool-parameters

Conversation

@jim4226
Copy link
Copy Markdown
Owner

@jim4226 jim4226 commented May 29, 2026

Summary

Adds tool_parameters: dict[str, Any] | None = None to Event in csis/substrate/event_log.py and a matching keyword arg to emit(), mirroring the tool_parameters field shipped in Claude Code v2.1.157 for tool_decision OTEL events.

Source

  • URL: https://code.claude.com/docs/en/changelog (v2.1.157, 2026-05-29)
  • Key entry: "Telemetry Enhancement: tool_decision events now include tool_parameters (bash commands, MCP/skill names) when OTEL_LOG_TOOL_DETAILS=1"

Theme

Theme 2 — Trust + verification. CSIS's Auditor reads the EventLog to construct the why-doc that gates every promotion. When the Coordinator (or a future Tool Execution primitive in P1.7) emits a tool_decision event, the Auditor currently sees only the generic payload dict — the tool's parameters are not structurally distinct from other event data. Adding a dedicated tool_parameters field gives the Auditor a clear schema path to query which tool was called with which arguments, enabling grader drift detection and exfiltration audits to operate on tool-call evidence, not inferred payload shapes.

What changed

File Change
csis/substrate/event_log.py Event gains tool_parameters: dict[str, Any] | None = Field(default=None, ...). emit() gains *, tool_parameters: dict[str, Any] | None = None keyword arg. All existing call sites are unchanged.
tests/test_substrate.py 2 new regression tests: (1) parameters round-trip through disk and chain stays valid; (2) legacy JSONL without the field deserializes with None default (backward compat guard).

No cycle-9 chokepoints touched

Event is a leaf Pydantic model. Coordinator.__init__, _BackendTracker, writer_iteration_id, and the promotion CAS are all untouched. The default tool_parameters=None means every existing emit() call is semantically unchanged.

Test plan

python -m pytest tests/test_substrate.py -v   # 15 passed (13 before + 2 new)
python -m pytest tests/ -q                    # 252 passed, 0 failed

Generated by Claude Code

Claude Code v2.1.157 added tool_parameters to OTEL tool_decision events
so that bash commands, MCP tool names, and skill URIs are auditable at
the call-site rather than buried inside a generic payload dict. CSIS's
EventLog carries the same semantic gap.

Adds an optional tool_parameters field (dict | None, default None) to
Event and a matching keyword arg to emit(). All existing callers are
unchanged. Existing JSONL files without the field deserialize with None
(Pydantic default — backward compat regression test added).

Touches: csis/substrate/event_log.py (Event model + emit signature)
Tests: 2 new in tests/test_substrate.py (round-trip + legacy compat)
@jim4226 jim4226 mentioned this pull request May 29, 2026
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