CodeCrafters - Latest posts https://forum.codecrafters.io Latest posts ./your_program.sh: cannot execute: required file not found

Looks like this is a Windows CRLF line ending issue. Could you check whether this is coming from your editor or your Git settings? @gabrielbudke

One quick way to fix it:

sudo apt install dos2unix
dos2unix your_program.sh

Let me know how it goes!

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_6 Wed, 22 Apr 2026 04:23:45 +0000 forum.codecrafters.io-post-26838
./your_program.sh: cannot execute: required file not found Here it is:

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_5 Wed, 22 Apr 2026 03:57:00 +0000 forum.codecrafters.io-post-26836
./your_program.sh: cannot execute: required file not found Thanks for sharing the screenshot! Hmm, that does look unusual.

Could you try running file your_program.sh and bash your_program.sh and share the output as well?

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_4 Wed, 22 Apr 2026 03:52:58 +0000 forum.codecrafters.io-post-26835
./your_program.sh: cannot execute: required file not found Hello, @andy1li!
I’m using WSL with Ubuntu.

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_3 Wed, 22 Apr 2026 03:47:10 +0000 forum.codecrafters.io-post-26834
./your_program.sh: cannot execute: required file not found Hey @gabrielbudke, could you share which OS you’re using and a screenshot of how you’re running it?

Also, could you share the output of running pwd and ls as well?

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_2 Wed, 22 Apr 2026 03:41:30 +0000 forum.codecrafters.io-post-26833
./your_program.sh: cannot execute: required file not found I’m stuck on improving my solution.

I’ve tried to run it locally following the README.md file and some other answers in this forum, but i cannot run without problem.

Here are my logs:

➜ ./your_program.sh 
bash: ./your_program.sh: cannot execute: required file not found

Here’s a link to my repo:

gabrielbudke/codecrafters-claude-code-python: Build your own Claude Code

]]>
https://forum.codecrafters.io/t/your-program-sh-cannot-execute-required-file-not-found/16059#post_1 Wed, 22 Apr 2026 03:35:57 +0000 forum.codecrafters.io-post-26832
Spotted a copy-paste typo in the dns-server-tester go.mod Hey @dhotrey, thanks for catching this, and for putting together the PR! I’ve merged it now.

Feel free to fix the same issue in the other tester repos, and just tag me to merge them. Looks like it affects three other repos.

]]>
https://forum.codecrafters.io/t/spotted-a-copy-paste-typo-in-the-dns-server-tester-go-mod/16056#post_4 Wed, 22 Apr 2026 03:32:14 +0000 forum.codecrafters.io-post-26830
Ruby 4.0 is now available! Hey everyone!

The default Ruby version has been updated across all supported challenges.

Previously running on v3.4, we’ve now upgraded to v4.0.

To use the latest version, be sure to update the buildpack version in your repo as well.

]]>
https://forum.codecrafters.io/t/ruby-4-0-is-now-available/16058#post_1 Mon, 20 Apr 2026 06:32:02 +0000 forum.codecrafters.io-post-26825
Rust 1.95 is now available! Hey everyone!

The default Rust version has been updated across all supported challenges.

Previously running on v1.94, we’ve now upgraded to v1.95.

To use the latest version, be sure to update the buildpack version in your repo as well.

]]>
https://forum.codecrafters.io/t/rust-1-95-is-now-available/16057#post_1 Mon, 20 Apr 2026 05:22:59 +0000 forum.codecrafters.io-post-26823
Spotted a copy-paste typo in the dns-server-tester go.mod Hey team,

I was reading the source code for the DNS tester and noticed a naming collision.

It looks like a bit of copy-paste debt from the grep challenge, the go.mod for the DNS tester is currently identifying itself as the grep-tester dns-server-tester/go.mod at e491a49873be71b5810e0e67525d16d6b3e1a5e1 · codecrafters-io/dns-server-tester · GitHub

This also flows into the internal imports and the Makefile.

I’ve raised a PR to tidy this up so it correctly identifies as dns-server-tester, which should help avoid naming collisions .

PR Link: chore: fix incorrect module naming and internal paths by dhotrey · Pull Request #36 · codecrafters-io/dns-server-tester · GitHub

Also, I noticed that in the Makefiles for most of the testers, the copy_course_file directive points to /repo/build-your-own-<x>/contents/course-definition.yml, but in practice, in most repos, it has been moved to the root: /repo/build-your-own-<x>/course-definition.yml.

example from http-server-tester :

copy_course_file:
	hub api \
		repos/codecrafters-io/build-your-own-http-server/contents/course-definition.yml \
		| jq -r .content \
		| base64 -d \
		> internal/test_helpers/course_definition.yml

If you guys give me the go-ahead, I don’t mind fixing and raising a PR for this pattern across the other testers as well!

]]>
https://forum.codecrafters.io/t/spotted-a-copy-paste-typo-in-the-dns-server-tester-go-mod/16056#post_1 Sun, 19 Apr 2026 22:28:57 +0000 forum.codecrafters.io-post-26820
How to debug weird expected response? Alright!

]]>
https://forum.codecrafters.io/t/how-to-debug-weird-expected-response/16055#post_5 Sat, 18 Apr 2026 23:29:18 +0000 forum.codecrafters.io-post-26817
How to debug weird expected response? Hey @AbdelrahmanElsheikh965, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

]]>
https://forum.codecrafters.io/t/how-to-debug-weird-expected-response/16055#post_3 Sat, 18 Apr 2026 23:28:17 +0000 forum.codecrafters.io-post-26815
How to debug weird expected response? I’m stuck on Stage #FY6

I’ve tried running the same commands from multiple clients connected locally, and everything is fine

Here are my logs:

[tester::#FY6] [client-1] ✔︎ Received ["OK", 23, 1, "1"]
[tester::#FY6] [client-2] $ redis-cli GET banana
[tester::#FY6] [client-2] Sent bytes: "*2\r\n$3\r\nGET\r\n$6\r\nbanana\r\n"
[tester::#FY6] [client-2] Received bytes: "$-1\r\n"
[tester::#FY6] [client-2] Received RESP null bulk string: "$-1\r\n"
[tester::#FY6] Expected bulk string, found null bulk string ($-1\r\n)
[tester::#FY6] Test failed
[tester::#FY6] Terminating program
[your_program] key: banana | client_data:  {}
[your_program] DEBUGGG !!!! 
[tester::#FY6] Program terminated successfully

And here’s a snippet of my code:

]]>
https://forum.codecrafters.io/t/how-to-debug-weird-expected-response/16055#post_1 Sat, 18 Apr 2026 23:26:42 +0000 forum.codecrafters.io-post-26813
Testcase failed: BLPOP on string value Hey @asli-nobita, looks like you’ve got past the stage #XJ7. Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

]]>
https://forum.codecrafters.io/t/testcase-failed-blpop-on-string-value/16054#post_4 Sat, 18 Apr 2026 22:26:08 +0000 forum.codecrafters.io-post-26810
How to replace 'codecrafters submit' commit messages the 'official' way? Was about to see if I could code this but looks like someone beat me to it :slight_smile: feat: custom commit message on submit by 0xhasann · Pull Request #82 · codecrafters-io/cli · GitHub

]]>
https://forum.codecrafters.io/t/how-to-replace-codecrafters-submit-commit-messages-the-official-way/15824#post_8 Sat, 18 Apr 2026 10:16:35 +0000 forum.codecrafters.io-post-26805
Testcase failed: BLPOP on string value How should we handle it if a BLPOP operation is called on a key which stored a string value previously?
The testcases are as follows:
SET mango banana
BLPOP mango 0.3
Are we to assume the BLPOP operation changes the type of the value stored at key mango, to a list instead?

]]>
https://forum.codecrafters.io/t/testcase-failed-blpop-on-string-value/16054#post_1 Sat, 18 Apr 2026 05:22:07 +0000 forum.codecrafters.io-post-26803
Question about fd8: Fetch multiple messages from disk. Data isn't being prepended to response from log file correctly Hey @whorst, sorry for the delayed response!

There might be a few things going on here, but two issues stand out:

  1. This condition seems unnecessary. You can simplify this by just going through the else branch and assigning the full data:

partitionToFetch.TopicFetchResponse.Records = data.

  1. The reversal logic here also looks unnecessary, since extracting the lower 7 bits is already correct:

I’ve extended your membership by two weeks so you can have a bit more time to experiment. Let me know how it goes!

]]>
https://forum.codecrafters.io/t/question-about-fd8-fetch-multiple-messages-from-disk-data-isnt-being-prepended-to-response-from-log-file-correctly/15691#post_7 Sat, 18 Apr 2026 01:41:54 +0000 forum.codecrafters.io-post-26800
OCaml track now supports Git Hey everyone!

The OCaml track now includes the Build your own Git challenge.

Ready to put your OCaml skills to the test? Jump into the OCaml track, and let us know how it goes!

]]>
https://forum.codecrafters.io/t/ocaml-track-now-supports-git/16052#post_1 Thu, 16 Apr 2026 19:54:43 +0000 forum.codecrafters.io-post-26797
Codecrafters - Issue while setting up with Python. ping command not found
andy1li:

brew remove codecrafters

Yes, this worked. Thank you. @andy1li

]]>
https://forum.codecrafters.io/t/codecrafters-issue-while-setting-up-with-python-ping-command-not-found/16050#post_4 Thu, 16 Apr 2026 04:43:27 +0000 forum.codecrafters.io-post-26796
To what extent is using the standard library considered cheating? Thanks guys!

]]>
https://forum.codecrafters.io/t/to-what-extent-is-using-the-standard-library-considered-cheating/16031#post_5 Thu, 16 Apr 2026 00:36:21 +0000 forum.codecrafters.io-post-26795
[Rust] #JV1 (redirect stdout) seems to require #NI6 (single quotes) Hey @senevoldsen and @senevoldsen, this is an oversight on our end, and we’re currently updating the tester and instructions.

]]>
https://forum.codecrafters.io/t/rust-jv1-redirect-stdout-seems-to-require-ni6-single-quotes/15850#post_7 Wed, 15 Apr 2026 20:02:20 +0000 forum.codecrafters.io-post-26794
`codecrafters submit` error Hey @Abdurrazzaq5, looks like this may have been caused by a temporary issue on our end. Could you try again and let me know if it still persists?

]]>
https://forum.codecrafters.io/t/codecrafters-submit-error/16051#post_3 Wed, 15 Apr 2026 17:13:39 +0000 forum.codecrafters.io-post-26793
Codecrafters - Issue while setting up with Python. ping command not found Hey @learning-dev, It’s likely you installed an older version of the CodeCrafters CLI via Homebrew . Could you try removing it with:

brew remove codecrafters

Then reinstall using the instructions on the setup page and try again. Let me know if this still doesn’t work.

]]>
https://forum.codecrafters.io/t/codecrafters-issue-while-setting-up-with-python-ping-command-not-found/16050#post_3 Wed, 15 Apr 2026 16:51:32 +0000 forum.codecrafters.io-post-26792
`codecrafters submit` error CodeCrafters/BuildYourBitTorrent/codecrafters-bittorrent-rust$ codecrafters submit
Submitting changes (commit: bb9abfc)…

push changes: run git command: fatal: unable to access ‘https://git.codecrafters.io/769d7af23164b99c/’: gnutls_handshake() failed: The TLS connection was non-properly terminated.
. Error: exit status 128

]]>
https://forum.codecrafters.io/t/codecrafters-submit-error/16051#post_1 Wed, 15 Apr 2026 11:02:12 +0000 forum.codecrafters.io-post-26790
Codecrafters - Issue while setting up with Python. ping command not found

trying this command listed in setup.

``curl -fsSL ``https://codecrafters.io/install.sh`` | bashcodecrafters ping``

Still not working.

]]>
https://forum.codecrafters.io/t/codecrafters-issue-while-setting-up-with-python-ping-command-not-found/16050#post_1 Wed, 15 Apr 2026 10:34:14 +0000 forum.codecrafters.io-post-26788
#PL3 - a test that failed for me despite passing the stage Yes, we follow the order as presented in the book, so the check for self-initialization comes a bit later.

]]>
https://forum.codecrafters.io/t/pl3-a-test-that-failed-for-me-despite-passing-the-stage/15977#post_7 Tue, 14 Apr 2026 19:17:54 +0000 forum.codecrafters.io-post-26785
Bug in Starting background jobs #at7? Quick update: we’ve pushed a fix in this PR.

Could you give it another try and let me know how it goes? @fly-434

]]>
https://forum.codecrafters.io/t/bug-in-starting-background-jobs-at7/16026#post_12 Tue, 14 Apr 2026 11:08:55 +0000 forum.codecrafters.io-post-26782
#pg8 (Functions without arguments): Add check for redefining clock()? I think the issue here is realizing that builtin functions need to be treated like any other type of variable, thus allowing them to be redefined. I made a mistake of treating clock like a keyword and bypassing normal variable lookup. I learned I definitely need to pay more attention to what the book says.

#PZ7 comes before the functions portion of the challenge so the tests won’t cover this case. The second example I gave, checking that a function is equal to itself, is also not tested for as far as I know.

]]>
https://forum.codecrafters.io/t/pg8-functions-without-arguments-add-check-for-redefining-clock/16044#post_7 Tue, 14 Apr 2026 02:38:18 +0000 forum.codecrafters.io-post-26781
#PL3 - a test that failed for me despite passing the stage I think the check for this specific case actually occurs in #PT7 “Self Initialization”. It definitely is a large gap between #PL3 (“Assignment operation”) and #PT7 if you do the challenge extensions in the listed order!

I guess the case of checking for self-initialization of globals was deferred until we had working scopes and a resolver, since we would have to revisit the self-initialization problem anyway?

]]>
https://forum.codecrafters.io/t/pl3-a-test-that-failed-for-me-despite-passing-the-stage/15977#post_6 Tue, 14 Apr 2026 02:31:33 +0000 forum.codecrafters.io-post-26780
#PL3 - a test that failed for me despite passing the stage Hey @yinchi sorry for the delayed response!

Since you’ve finished the Resolving and Binding extension, does Stage #de8 (Identifier Resolution) cover the problematic case you’ve encountered?

]]>
https://forum.codecrafters.io/t/pl3-a-test-that-failed-for-me-despite-passing-the-stage/15977#post_5 Tue, 14 Apr 2026 01:47:21 +0000 forum.codecrafters.io-post-26778
#pg8 (Functions without arguments): Add check for redefining clock()? Hey @yinchi, since you’ve finished the Resolving and Binding extension, does Stage #PZ7 (Variable Redeclaration) cover the problematic case you’ve encountered?

]]>
https://forum.codecrafters.io/t/pg8-functions-without-arguments-add-check-for-redefining-clock/16044#post_5 Tue, 14 Apr 2026 01:43:26 +0000 forum.codecrafters.io-post-26776
State #DF4 - pkg-config required by Ocaml package @rubenbakker Sorry for the delayed response. I’ve added pkg-config to the OCaml build environment in this PR.

Let me know if you’re still running into any issues.

]]>
https://forum.codecrafters.io/t/state-df4-pkg-config-required-by-ocaml-package/15921#post_6 Tue, 14 Apr 2026 01:01:34 +0000 forum.codecrafters.io-post-26773
Prompt leads to deceptive answers Hey @areebkhan91, thanks for highlighting the issue! We’ve updated the instructions and removed the reference to “Deleted Readme_old.md” in this PR.

Let us know if anything else looks off!

]]>
https://forum.codecrafters.io/t/prompt-leads-to-deceptive-answers/15974#post_4 Mon, 13 Apr 2026 22:09:06 +0000 forum.codecrafters.io-post-26771
Code cannot resolve "#include <cpr/cpr.h>" or "#include <nlohmann/json.hpp>" Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

]]>
https://forum.codecrafters.io/t/code-cannot-resolve-include-cpr-cpr-h-or-include-nlohmann-json-hpp/15991#post_4 Mon, 13 Apr 2026 21:12:29 +0000 forum.codecrafters.io-post-26770
[C] Implemented raw mode manually, but can't pass #UN3 Test anymore Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

]]>
https://forum.codecrafters.io/t/c-implemented-raw-mode-manually-but-cant-pass-un3-test-anymore/16003#post_4 Mon, 13 Apr 2026 21:11:59 +0000 forum.codecrafters.io-post-26769
Stuck with #SX3 Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

]]>
https://forum.codecrafters.io/t/stuck-with-sx3/16025#post_7 Mon, 13 Apr 2026 21:11:32 +0000 forum.codecrafters.io-post-26768
How to replace 'codecrafters submit' commit messages the 'official' way? Just wanted to say I was looking for this as well. Either works but personally I would like an amendable commit message (`codecrafters submit -m "xyz"). Not sure if there’s a way to upvote this feature request!

]]>
https://forum.codecrafters.io/t/how-to-replace-codecrafters-submit-commit-messages-the-official-way/15824#post_7 Mon, 13 Apr 2026 09:14:38 +0000 forum.codecrafters.io-post-26765
Kotlin 2.3 is now available Hey everyone!

The default Kotlin version has been updated across all supported challenges!

Previously running on v2.2, we’ve now upgraded to v2.3.

To use the latest version, be sure to update the buildpack version in your repo as well.

]]>
https://forum.codecrafters.io/t/kotlin-2-3-is-now-available/16047#post_1 Mon, 13 Apr 2026 00:29:23 +0000 forum.codecrafters.io-post-26763
#pg8 (Functions without arguments): Add check for redefining clock()? Another weird test that’s especially relevant to the Rust path:

fun foo() {}
print foo == foo;

Thus the AST nodes representing foo must hold an Rc to the same data, and cloning that data during node creation would be an error (returns false for the above test instead of true).

]]>
https://forum.codecrafters.io/t/pg8-functions-without-arguments-add-check-for-redefining-clock/16044#post_4 Sat, 11 Apr 2026 22:36:46 +0000 forum.codecrafters.io-post-26761
#pg8 (Functions without arguments): Add check for redefining clock()? I was wondering about the correct behavior for code like:

print clock();
fun clock() {
  return 0;
}
print clock();

I think that we need to allow clock to be shadowed by the new definition. This means that the root program environment needs to be populated with our builtins, rather than using a separate lookup table (which would prevent shadowing). I had made this mistake previously, however there doesn’t seem to be a test for it.

There might also be a test to see whether the “evaluate” function from before can also handle builtins, not just “run”.

]]>
https://forum.codecrafters.io/t/pg8-functions-without-arguments-add-check-for-redefining-clock/16044#post_1 Sat, 11 Apr 2026 03:13:22 +0000 forum.codecrafters.io-post-26756
Bug in Starting background jobs #at7? Thanks for looking into this. Let me know if I can help in any way

]]>
https://forum.codecrafters.io/t/bug-in-starting-background-jobs-at7/16026#post_11 Fri, 10 Apr 2026 19:42:19 +0000 forum.codecrafters.io-post-26755
Bug in Starting background jobs #at7? Hey @fly-434, this is an issue on our end.

We’re investigating it now and will share an update as soon as we have a fix

]]>
https://forum.codecrafters.io/t/bug-in-starting-background-jobs-at7/16026#post_10 Fri, 10 Apr 2026 00:05:55 +0000 forum.codecrafters.io-post-26751
Code cannot resolve "#include <cpr/cpr.h>" or "#include <nlohmann/json.hpp>" Hey @PabloOliveiraVeizaga, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

]]>
https://forum.codecrafters.io/t/code-cannot-resolve-include-cpr-cpr-h-or-include-nlohmann-json-hpp/15991#post_3 Thu, 09 Apr 2026 22:32:43 +0000 forum.codecrafters.io-post-26750
Some models overwrite the main.py in write tool implementation @areebkhan91 Thanks for sharing the detailed trace, that’s super helpful.

On the tester side, we run everything inside a temporary working directory (“workspace”), so any file writes are isolated and won’t overwrite anything.

Suggestion: Try running your program from a separate temporary folder as well. That should help avoid unintended overwrites.

]]>
https://forum.codecrafters.io/t/some-models-overwrite-the-main-py-in-write-tool-implementation/15973#post_8 Thu, 09 Apr 2026 22:29:32 +0000 forum.codecrafters.io-post-26748
Problem with 'cd' command and "/app" output in #RA6 Hey @FilipWiacek94, the order of command handlers matters in your Main.java:

The ExternalCommandHandler is placed before CdCommandHandler. This causes cd to be picked up as an external command instead of your builtin.

On many systems, there’s an external binary with the same name as shell builtins (e.g. /usr/bin/cd). But running that won’t change your Java process’s working directory, it only affects the subprocess, which exits immediately.

]]>
https://forum.codecrafters.io/t/problem-with-cd-command-and-app-output-in-ra6/15993#post_5 Thu, 09 Apr 2026 21:07:44 +0000 forum.codecrafters.io-post-26746
Bug in Starting background jobs #at7? Yes: command_path=‘/bin/sleep’.

Adding a 1 second sleep before outputting the job number/pid didn’t help.

From my shell:

$ sleep 15 &
[1] 50410

From bash:

ps -o pid,ppid,cmd -p 50410
PID PPID CMD
50410 50348 sleep 15

$ ps -o pid,ppid,cmd -p 50348
PID PPID CMD
50348 1484 python3 app/main.py

Even using pstree, I don’t see anything anomalous (apart from some zombie processes I need to reap):

      |-tmux: server(1483)-+-bash(1484)---python3(50348)-+-sleep(50350)
      |                    |                             |-sleep(50410)
      |                    |                             `-sleep(50631)

I don’t know what else to try. Can I find somewhere the code that checks for the presence of the child process or is it closed source?

]]>
https://forum.codecrafters.io/t/bug-in-starting-background-jobs-at7/16026#post_9 Thu, 09 Apr 2026 17:15:11 +0000 forum.codecrafters.io-post-26745
[C] Implemented raw mode manually, but can't pass #UN3 Test anymore Hey @KenyiPlatanazo, I tried running your code against the previous stages, but it’s actually no longer passing the second stage #CZ2 (Handle invalid commands).

I also tried commenting out enable_raw_mode(), but the issue still persists.

Suggestions:

  1. Use our CLI to test against previous stages by running:
codecrafters test --previous
  1. Focus on fixing the early stages first, as later stages depend on them.
]]>
https://forum.codecrafters.io/t/c-implemented-raw-mode-manually-but-cant-pass-un3-test-anymore/16003#post_3 Wed, 08 Apr 2026 19:34:44 +0000 forum.codecrafters.io-post-26742
Creating a dumb terminal Hey @ahmadbenali, you should be able to resolve this by adding --enable-native-access=ALL-UNNAMED to .codecrafters/run.sh.

Give that a try and let me know if it works!

]]>
https://forum.codecrafters.io/t/creating-a-dumb-terminal/16011#post_8 Wed, 08 Apr 2026 11:55:57 +0000 forum.codecrafters.io-post-26740
Stuck with #SX3 Hey @lakshyabatman, looks like you’ve got past this stage. Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

]]>
https://forum.codecrafters.io/t/stuck-with-sx3/16025#post_5 Wed, 08 Apr 2026 10:36:59 +0000 forum.codecrafters.io-post-26738
Weird behavior in C This fixed the problem. Thanks

I also tried your testing code above but for some reason my mac didn’t catch and print the redundant characters so I didn’t notice it.

]]>
https://forum.codecrafters.io/t/weird-behavior-in-c/16033#post_6 Wed, 08 Apr 2026 01:40:45 +0000 forum.codecrafters.io-post-26731