Skip to content
Back to skills

547 2026 01 25 Tool Registry Todo Alignment 77ea7dea

ASecurity

Introduced a ToolCallRegistry as the single source of truth for tool call lifecycle data and migrated session todos to typed TodoItem storage with explicit serialization. This removes duplicated tool call tracking and aligns runtime todo state with canonical types.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agents

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 547-2026-01-25_tool-registry-todo-alignment_77ea7dea --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 547 2026 01 25 Tool Registry Todo Alignment 77ea7dea?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 547 2026 01 25 Tool Registry Todo Alignment 77ea7dea
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-547-2026-01-25-tool-registry-todo-alignment-77ea7d/badge)](https://www.skillsdirectory.com/skills/tools-only-547-2026-01-25-tool-registry-todo-alignment-77ea7d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
title: Tool registry and typed todo alignment
link: tool-registry-todo-alignment
type: delta
path: src/tunacode/types/tool_registry.py
depth: 0
seams: [S] state
ontological_relations:
  - relates_to: [[tool-call-lifecycle]]
  - affects: [[runtime-state]]
  - affects: [[task-state]]
tags:
  - tool-calls
  - todos
  - state
  - registry
created_at: 2026-01-25T23:09:13Z
updated_at: 2026-01-25T23:09:13Z
uuid: 0ea0d90a-081b-4b9a-be37-4a325d4c7914
---

## Summary

Introduced a ToolCallRegistry as the single source of truth for tool call lifecycle data and migrated session todos to typed TodoItem storage with explicit serialization. This removes duplicated tool call tracking and aligns runtime todo state with canonical types.

## Context

Tool calls were tracked in separate runtime lists and arg caches, while todos were stored as ad-hoc dicts. Both patterns increased drift risk and made lifecycle semantics inconsistent across the session.

## Changes

- **Tool registry**: Added `ToolCallRegistry` and wired tool dispatch, tool execution failure tracking, and tool return completion updates to the registry.
- **Runtime state**: Removed `tool_calls` and `tool_call_args_by_id`, replacing them with `runtime.tool_registry`.
- **Todo alignment**: Stored todos as `TodoItem` instances, updated todo tools to emit typed items, and normalized session serialization/deserialization.
- **Docs**: Refreshed codebase-map and refactor docs to reflect registry ownership and typed todos.

## Behavioral Impact

**What users notice:**
- Tool lifecycle data is consistent across executions and JSON export paths.
- Todo state is typed and validated consistently in todowrite/todoread.

**What didn't change:**
- Tool execution flow and message history semantics remain the same.
- Legacy session files still load via dict-to-TodoItem conversion.

## Related Cards

- [[orphaned-retry-prompt-dangling-cleanup]]

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.