Live data from Hacker News

Show HN: Continuous Claude – run Claude Code in a loop

github.com

21–30 of 66 posts

Re: Show HN: Continuous Claude – run Claude Code in a loop

#21
post #15

Earlier quoted context omitted.

im not saying OP did this, but I've actually had AI spit out some pretty stellar bash scripts, surprisingly

No, you're right. It was a pretty collaborative effort with me and Claude!

FYI, you're missing two patterns that allow the `--key=value` admirers and the `-alltheshortopsinasinglestring` spacebar savers among us to be happy (for the otherwise excellent options parsing code).

   shopt -s extglob
   case "$1"
     # Flag support - allow -xyz z-takes-params
     -@(a|b|c)*) _flag=${1:1:1}; _rest=${1:2}; shift; set -- "-$_flag" "-$_rest" "$@";;
     # Param=Value support
     -?(-)*=*) _key=${1%%=*}; _value=${1#*=}; shift; set -- "${_key}" "$_value" "$@";;
   esac

Re: Show HN: Continuous Claude – run Claude Code in a loop

#22
post #5

> codebase with hundreds of thousands of lines of code and go from 0% to 80%+ coverage in the next few weeks I had a coworker do this with windsurf + manual driving awhile back and it was an absolute mess. Awful tests that were unmaintainable and next to useless (too much mocking, testing that the code “works the way it was written”, etc.). Writing a useful test suite is one of the most important parts of a codebase…

There is no free lunch. The amount of prompt writing to give the LLM enough context about your codebase etc is comparable to writing the tests yourself.

Code assistance tools might speed up your workflow by maybe 50% or even 100%, but it's not the geometric scaling that is commonly touted as the benefits of autonomous agentic AI.

And this is not a model capability issue that goes away with newer generations. But it's a human input problem.

Re: Show HN: Continuous Claude – run Claude Code in a loop

#23
post #5

> codebase with hundreds of thousands of lines of code and go from 0% to 80%+ coverage in the next few weeks I had a coworker do this with windsurf + manual driving awhile back and it was an absolute mess. Awful tests that were unmaintainable and next to useless (too much mocking, testing that the code “works the way it was written”, etc.). Writing a useful test suite is one of the most important parts of a codebase…

Cleanroom design of "this is a function's interface, it does this and that, write tests for that function to pass" generally can get you pretty decent results.

But "throw vague prompt at AI direction" does about as well as doing same thing with an intern.

Re: Show HN: Continuous Claude – run Claude Code in a loop

#24

Earlier quoted context omitted.

It sends a flag that dangerously allows Claude to just do whatever it wants and only give us the final answer. It doesn't do the back-and-forth or ask questions.

The `--dangerously-skip-permissions` flag (a.k.a. "YOLO mode") does do the back-and-forth and asks questions, so this is a bit more than that.

Yes. I did not look but most probably the non interactive mode flag is used (-p)

Re: Show HN: Continuous Claude – run Claude Code in a loop

#26
post #21

Earlier quoted context omitted.

No, you're right. It was a pretty collaborative effort with me and Claude!

FYI, you're missing two patterns that allow the `--key=value` admirers and the `-alltheshortopsinasinglestring` spacebar savers among us to be happy (for the otherwise excellent options parsing code). shopt -s extglob case "$1" # Flag support - allow -xyz z-takes-params -@(a|b|c)*) _flag=${1:1:1}; _rest=${1:2}; shift; set -- "-$_flag" "-$_rest" "$@";; # Param=Value support -?(-)*=*) _key=${1%%=*}; _value=${1#*=}; shi…

For letting me know! Would you like to create a PR? Otherwise I'll add you as a Co-Authored-By!

Re: Show HN: Continuous Claude – run Claude Code in a loop

#27
post #10
post #5

> codebase with hundreds of thousands of lines of code and go from 0% to 80%+ coverage in the next few weeks I had a coworker do this with windsurf + manual driving awhile back and it was an absolute mess. Awful tests that were unmaintainable and next to useless (too much mocking, testing that the code “works the way it was written”, etc.). Writing a useful test suite is one of the most important parts of a codebase…

I find coding agents can produce very high quality tests if and only if you give them detailed guidance and good starting examples. Ask a coding agent to build tests for a project that has none and you're likely to get all sorts of messy mocks and tests that exercise internals when really you want them to exercise the top level public API of the project. Give them just a few starting examples that demonstrate how to…

I feel like that leaves me with the hard part of writing tests, and only saves me the bit I can usually power through quickly because it's easy to get into a flow state for it.

Re: Show HN: Continuous Claude – run Claude Code in a loop

#28
post #22
post #5

> codebase with hundreds of thousands of lines of code and go from 0% to 80%+ coverage in the next few weeks I had a coworker do this with windsurf + manual driving awhile back and it was an absolute mess. Awful tests that were unmaintainable and next to useless (too much mocking, testing that the code “works the way it was written”, etc.). Writing a useful test suite is one of the most important parts of a codebase…

There is no free lunch. The amount of prompt writing to give the LLM enough context about your codebase etc is comparable to writing the tests yourself. Code assistance tools might speed up your workflow by maybe 50% or even 100%, but it's not the geometric scaling that is commonly touted as the benefits of autonomous agentic AI. And this is not a model capability issue that goes away with newer generations. But it's…

I don't know if this is true.

For example, you can spend a few hours writing a really good set of initial tests that cover 10% of your codebase, and another few hours with an AGENTS.md that gives the LLM enough context about the rest of the codebase. But after that, there's a free* lunch because the agent can write all the other tests for you using that initial set and the context.

This also works with "here's how I created the Slack API integration, please create the Teams integration now" because it has enough to learn from, so that's free* too. This kind of pattern recognition means that prompting is O(1) but the model can do O(n) from that (I know, terrible analogy).

*Also literally becomes free as the cost of tokens approaches zero

Re: Show HN: Continuous Claude – run Claude Code in a loop

#29
post #24

Earlier quoted context omitted.

The `--dangerously-skip-permissions` flag (a.k.a. "YOLO mode") does do the back-and-forth and asks questions, so this is a bit more than that.

Yes. I did not look but most probably the non interactive mode flag is used (-p)

It does `claude -p "This is the prompt" --dangerously-skip-permissions --output-format json`

Re: Show HN: Continuous Claude – run Claude Code in a loop

#30
post #24

Earlier quoted context omitted.

The `--dangerously-skip-permissions` flag (a.k.a. "YOLO mode") does do the back-and-forth and asks questions, so this is a bit more than that.

Yes. I did not look but most probably the non interactive mode flag is used (-p)

Oh! TIL, thank you.
Post reply on HN