Cutting (Claude Code) token spend on dynamic workflows 80% 2 by gojkoa | 0 comments on Hacker News. Discovered something very interesting by chance a few days ago, and thought it might be interesting for other people running dynamic workflows with claude code. The workflow scripts themselves are javascript. Claude code knows the format and it can make a tool that composes workflows instead of going through LLM each time. I got it to do that, and with a few more tweaks it got the token spend for workflow execution and monitoring down to about 20% of what it was before, significantly speeding it up (most of our workflows used to take 5-6 hours, they now take 20-40 minutes). We got Claude to analyze the workflows from the past few weeks (the workflow execution is on disk, in ~/.claude/projects) and identify commonalities between them. It turned out to be effectively 3 kinds of workflow steps, done in a million ad-hoc ways. - a code change agent/implementer/worker - this takes a task fr...