agent active

swift-coding-agent

Maker: ivan-magda License: MIT Stars: 178 First released: 2026-03-10 Language: Swift

About

The project's premise is that the way to understand coding agents is to build one, so Ivan Magda rebuilt a Claude Code-style CLI in Swift as a staged series published on ivanmagda.dev. The code keeps the agent loop fixed — send messages, execute tool calls when the model requests them, repeat — and adds capability in isolated stages: file tools with path safety, todo tracking with reminder injection, recursive subagents with fresh context, markdown skill files, three-layer context compaction, a file-based task DAG, and actor-based background tasks under Swift 6.2 strict concurrency. It talks directly to Anthropic's Messages API over SSE rather than using an SDK, runs on macOS and Linux, and deliberately omits conveniences a production tool would need. The audience is engineers studying agent architecture, particularly those who want a compiled-language reference implementation.