I think this is a good learning project, based in a long perusal of the github repo. One suggestion: don’t call the CLI component of the project ‘claude’ - that seems like asking for legal takedown problems.
I’m also working on agents in Swift with the AFM, just having it locally already installed is a huge selling point. I think narrowly-focused agents with good tooling and architecture could accomplish quite a bit, with tradeoffs in speed and cost. But I’m under the assumption that local models (like frontier models) will only get better with time
the interesting design tension i ran into building in this space is context management for longer sessions. the model accumulates tool call history that degrades output quality well before you hit the hard context limit - you start seeing "let me check that again" loops and increasingly hedged tool selection.a few things that helped: (1) summarizing completed sub-task outputs into a compact working-memory block that replaces the full tool call history, (2) being aggressive about dropping intermediate file read results once the relevant information has been extracted, and (3) structuring the initial system prompt so the model has a clear mental model of what "done" looks like before it starts exploring.the swift angle is actually a nice fit - the structured concurrency model maps well to the agent loop, and the strong type system makes tool schema definition less error-prone than JSON string wrangling in most other languages.
So that’s what it is! I was wondering why reducing context and summarising still makes it make mistakes and forget the steering. And couldn’t find explanation to why it starts ignoring instructions when context is not full at all.
How did you find that tool call is what degrades it?
Isn’t this a biggest problem there is and not just “design tension”?
I wouldn't say most of the magic is there, but I do think a lot of the progress we've seen in the last few years has been external to the models, and people sometimes miss that. For example, Claude Code has improved by leaps and bounds because the tooling has improved so much, from what I can see. But the underlying model is still what makes this relatively simple tooling so useful.
It’s not quite clear that this project is- there’s no “Claude code” a program. There’s tui/gui app, harness, prompts, and LLM. so this is a harness part?
I'm reading the first of the blog posts. I've never actually seen any Swift code before, but looking at the package definition I'm struck by how much it looks like Zig. I've never heard Andrew Kelly call Swift out as an influence, but it seems some Swift DNA is in Zig.
Also, brave calling it swift-claude-code given Anthropics behavior.
19 comments
[ 2.2 ms ] story [ 39.9 ms ] thread[0]: https://github.com/bensyverson/Operator
I used python+rich, but window resize wrecks UI layout
This isn't the issue with nodejs based stuff.
Also, brave calling it swift-claude-code given Anthropics behavior.