Live data from Hacker News

Unix philosophy and filesystem access makes Claude Code amazing

alephic.com

101–110 of 223 posts

Re: Unix philosophy and filesystem access makes Claude Code amazing

#101

Earlier quoted context omitted.

I have a Just task that runs linters (ruff and pyright, in my case), formatter, tests and pre-commit hooks, and have Claude run it every time it thinks it's done with a change. It's good enough that when the checks pass, it's usually complete.

This is the best way to approach it but if I had a dollar for each time Claude ran “—no-verify” on the git commits it was doing I’d have 10’s of dollars. Doesn’t matter if you tell it multiple times in CLAUDE.md to not skip checks, it will eventually just skip them so it can commit. It’s infuriating. I hope that as CC evolves there is a better way to tell/force the model to do things like that (linters, formatters, u…

I’ve found the same issue and also with Rust sometimes skips tests if it thinks they’re taking too long to compile, and says it’s unnecessary because it knows they’ll pass.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#102
post #99

Just because a popular new tool runs in the terminal, doesn't make it a shining example for the "Unix philosophy" lol. the comparison makes no sense if you think about it for more than 5 seconds and is hacker news clickbait you and i fell for :(

1. Small programs that do a single thing and are easy to comprehend.

2. Those programs integrate with one another to achieve more complex tasks.

3. Text streams are the universal interface and state is represented as text files on disk.

Sounds like the UNIX philosophy is a great match for LLMs that use text streams as their interface. It's just so normalized that we don't even "see" it anymore. The fact that all your tools work on files, are trivially callable by other programs with a single text-based interface of exec(), and output text makes them usable and consumable by an LLM with nothing else needed. This didn't have to be how we built software.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#103
post #89

Earlier quoted context omitted.

As an extension of this idea: for some tasks, rather than asking Claude Code to do a thing, you can often get better results from asking Claude Code to write and run a script to do the thing . Example: read this log file and extract XYZ from it and show me a table of the results. Instead of having the agent read in the whole log file into the context and try to process it with raw LLM attention, you can get it to rea…

It's a bit annoying that you have to tell it to do it, though. Humans (or at least programmers) "build the tools to solve the problem" so intuitively and automatically when the problem starts to "feel hard", that it doesn't often occur to the average programmer that LLMs don't think like this. When you tell an LLM to check the code for errors, the LLM could simply "realize" that the problem is complex enough to warra…

As the other commenter said, these days Claude Code often does actually reach for a script on its own, or for simpler tasks it will do a bash incantation with grep and sed.

That is for tasks where a programmatic script solution is a good idea though. I don't think your example of "check the code for errors" really falls in that category - how would you write a script to do that? "Staring at the code really hard" to catch errors that could never have been caught with any static analysis tool is actually where an LLM really shines! Unless by "check for errors" you just meant "run a static analysis tool", in which case sure, it should run the linter or typechecker or whatever.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#104

How is codex now compared to Claude code? Especially with gpt 5 high for planning and codex for the coding part.

I've found it slower than Claude but:

- significantly less obsequious (very few "you're absolutely right" that Claude vomits out on every interaction)

- less likely to forget and ignore context and AGENTS.md instructions

- fewer random changes claiming "now everything is fixed" in the first 30-50% of context

- better understanding of usage rules (see link below), one-shotting quite a few things Claude misses

Language + framework: Elixir, Phoenix LiveView, Ash, Oban, Reactor

SLoC: 22k lines

AGENTS.md: some simple instructions, pointing to two MCPs (Tidewave and Stripe), requirement to compile before moving onto next file, usage rules https://hexdocs.pm/usage_rules/readme.html

Re: Unix philosophy and filesystem access makes Claude Code amazing

#105

How is codex now compared to Claude code? Especially with gpt 5 high for planning and codex for the coding part.

Codex CLI had some huge upgrades in the past few months.

Before the GPT-5 release it was a poor imitation IMO - in the macOS terminal it somehow even disabled copy and paste!

Codex today is almost unrecognizable in comparison to that version. It's really good. I use both it and Claude Code almost interchangeably at the moment and I'm not really feeling that one is notably better than the other.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#106
post #99

Just because a popular new tool runs in the terminal, doesn't make it a shining example for the "Unix philosophy" lol. the comparison makes no sense if you think about it for more than 5 seconds and is hacker news clickbait you and i fell for :(

The Unix philosophy here is less about it being a terminal app (it's a very rich terminal app, lots of redrawing the whole screen etc) and more about the fact that giving a modern LLM the ability to run shell commands unlocks an incredibly useful array of new capabilities.

An LLM can do effectively anything that a human can do by typing commands into a shell now.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#107

Earlier quoted context omitted.

The light switch moment for me is when I realized I can tell claude to use linters instead of telling it to look for problems itself. The later generally works but having it call tools is way more efficient. I didn't even tell it what linters to use, I asked it for suggestions and it gave me about a dozen of suggestions, I installed them and it started using them without further instruction. I had tried coding with C…

As an extension of this idea: for some tasks, rather than asking Claude Code to do a thing, you can often get better results from asking Claude Code to write and run a script to do the thing . Example: read this log file and extract XYZ from it and show me a table of the results. Instead of having the agent read in the whole log file into the context and try to process it with raw LLM attention, you can get it to rea…

Cursor does this for me already all the time though, give that another shot maybe. For refactoring tasks in particular; it uses regex to find interesting locations , and the other day after maybe 10 of slow "ok now let me update this file... ok now let me update this file..." it suddenly paused, looked at the pattern so far, and then decided to write a python script to do the refactoring & executed it. For some reason it considered its work done even though the files didn't even pass linters but thats' polish.

Re: Unix philosophy and filesystem access makes Claude Code amazing

#108

How is codex now compared to Claude code? Especially with gpt 5 high for planning and codex for the coding part.

I've found GPT-5-Codex (the model used by default by OpenAI Codex CLI) to be superior but, as others have stated, slower.

Caveat, requires a linux environment, OSX, or WSL.

In general, I find that it will write smarter code, perform smarter refactors, and introduce less chaos into my codebase.

I'm not talking about toy codebases. I use agents on large codebases with dozens of interconnected tools and projects. Claude can be a bit of a nightmare there because it's quite myopic. People rave about it, but I think that's because they're effectively vibe-coding vastly smaller, tight-scoped things like tools and small websites.

On a larger project, you need a model to take the care to see what existing patterns you're using in your code, whether something's already been done, etc. Claude tends to be very fast but generate redundant code or comical code (let's try this function 7 different ways so that one of those ways will pass). This is junior coder bullshit. GPT-5-Codex isn't perfect but there's far far less of that. It takes maybe 5x longer but generates something that I have more confidence in.

I also see Codex using tools more in smart ways. If it's refactoring, it'll often use tools to copy code rather than re-writing the code. Re-writing code is how so many bugs have been introduced by LLMs.

I've not played with Sonnet 4.5 yet so it may have improved things!

Re: Unix philosophy and filesystem access makes Claude Code amazing

#109
A CLI might be the most information theoretically efficient form of API, significantly more succinct than eg. JSON based APIs. It's fitting that it would be optimal for Claude Code given the origin of the name "Claude".

Information theoretic efficiency seems to be a theme of UNIX architecture: https://benoitessiambre.com/integration.html.

Post reply on HN