# \#challenge:shell

**URL:** https://forum.codecrafters.io/tag/challenge-shell/9.md

[Latest](https://forum.codecrafters.io/latest.md) · [Categories](https://forum.codecrafters.io/categories.md) · [Tags](https://forum.codecrafters.io/tags.md)

---

## [Background Jobs - Reap one job #MA9](https://forum.codecrafters.io/t/background-jobs-reap-one-job-ma9/16316)

<div class="topic-metadata">

**Author:** [@sage-p1](https://forum.codecrafters.io/u/sage-p1)\
**Replies:** 0\
**Last updated:** [October 13, 2026, 12:21am UTC](https://forum.codecrafters.io/t/background-jobs-reap-one-job-ma9/16316 "2026-10-13T00:21:10Z")

</div>

I’m failing on Background Jobs - Reap one job #MA9 on the tester. When I try the tester, the jobs reads as getting terminated when it should still be running. Locally, the same series of events works as expected and matc…

---

## [\[Scala, Shell\] How to pass the first stage?](https://forum.codecrafters.io/t/scala-shell-how-to-pass-the-first-stage/16299)

<div class="topic-metadata">

**Author:** [@feoktant](https://forum.codecrafters.io/u/feoktant)\
**Replies:** 2\
**Last updated:** [October 5, 2026, 11:55am UTC](https://forum.codecrafters.io/t/scala-shell-how-to-pass-the-first-stage/16299 "2026-10-05T11:55:01Z")

</div>

Here’s a screenshot showing the output from running the commands: I’ve just uncommented the code, and got error. I ran .codecrafters/compile.sh locally with no errors. What could it be?

---

## [\[Go, Shell\] Submits all work, but local is bugged](https://forum.codecrafters.io/t/go-shell-submits-all-work-but-local-is-bugged/16288)

<div class="topic-metadata">

**Author:** [@Eoin95](https://forum.codecrafters.io/u/Eoin95)\
**Replies:** 2\
**Last updated:** [October 3, 2026, 6:07pm UTC](https://forum.codecrafters.io/t/go-shell-submits-all-work-but-local-is-bugged/16288 "2026-10-03T18:07:05Z")

</div>

I completed the base section of the shell and thought I’d run it locally to play about. With echo I noticed it’s dropping the first letter, input:“hello” → output:“ello”, Type doesn’t work for any of the commands, it is…

---

## [\[CPP, Shell, #EP2\] Script expects previous word when there is none](https://forum.codecrafters.io/t/cpp-shell-ep2-script-expects-previous-word-when-there-is-none/16291)

<div class="topic-metadata">

**Author:** [@sage-p1](https://forum.codecrafters.io/u/sage-p1)\
**Replies:** 0\
**Last updated:** [September 27, 2026, 3:03am UTC](https://forum.codecrafters.io/t/cpp-shell-ep2-script-expects-previous-word-when-there-is-none/16291 "2026-09-27T03:03:25Z")

</div>

Can someone explain why the solver expects the third argument to be “git” in the second tab press for completion? The full command is “git re” and has no third term, so I expect argv\[3\] to be an empty string.

---

## [Cat command is getting failed](https://forum.codecrafters.io/t/cat-command-is-getting-failed/16284)

<div class="topic-metadata">

**Author:** [@sneha1010](https://forum.codecrafters.io/u/sneha1010)\
**Replies:** 2\
**Last updated:** [September 22, 2026, 4:25am UTC](https://forum.codecrafters.io/t/cat-command-is-getting-failed/16284 "2026-09-22T04:25:58Z")

</div>

for single quotes challenge, how to implement cat command, without implementation it’s failing

---

## [\[C, shell, IP1\] Empty line appears out of nowhere](https://forum.codecrafters.io/t/c-shell-ip1-empty-line-appears-out-of-nowhere/16264)

<div class="topic-metadata">

**Author:** [@zergitscher](https://forum.codecrafters.io/u/zergitscher)\
**Replies:** 1\
**Last updated:** [September 8, 2026, 1:07pm UTC](https://forum.codecrafters.io/t/c-shell-ip1-empty-line-appears-out-of-nowhere/16264 "2026-09-08T13:07:13Z")

</div>

Hello. I’d like help with the stage in the title. I get an empty line that fails the test. I’m pretty sure I don’t print it and to confirm I copied someone else’s function, namely jolly-donkey-889683/src at main · cc-cod…

---

## [I can't sumbit my test](https://forum.codecrafters.io/t/i-cant-sumbit-my-test/16249)

<div class="topic-metadata">

**Author:** [@Ahad888](https://forum.codecrafters.io/u/Ahad888)\
**Replies:** 3\
**Last updated:** [August 29, 2026, 7:57am UTC](https://forum.codecrafters.io/t/i-cant-sumbit-my-test/16249 "2026-08-29T07:57:18Z")

</div>

---

## [\#JV1 ls: \>: No such file or directory](https://forum.codecrafters.io/t/jv1-ls-no-such-file-or-directory/16217)

<div class="topic-metadata">

**Author:** [@VOIDPACKET-VP](https://forum.codecrafters.io/u/VOIDPACKET-VP)\
**Replies:** 5\
**Last updated:** [July 29, 2026, 3:38pm UTC](https://forum.codecrafters.io/t/jv1-ls-no-such-file-or-directory/16217 "2026-07-29T15:38:44Z")

</div>

I’m stuck on Stage #JV1 I’ve tried to separate the full command into 2 parts : the text (toRedirect) and the file (redirectionLocation) then used ofstream to handle the \> operator logic Here are my logs: \[tester::#JV1…

---

## [\#UN3 weird cat command error](https://forum.codecrafters.io/t/un3-weird-cat-command-error/16220)

<div class="topic-metadata">

**Author:** [@iAyman-coder](https://forum.codecrafters.io/u/iAyman-coder)\
**Replies:** 2\
**Last updated:** [July 29, 2026, 8:32am UTC](https://forum.codecrafters.io/t/un3-weird-cat-command-error/16220 "2026-07-29T08:32:51Z")

</div>

I’m stuck on Stage #QP2. I’ve tried to pass the “Builtin completion (#QP2)” stage from the “Build your own shell” tutorial. It passes the tests for this specific stage, but it shows that my implementation of the previou…

---

## [\#QP2 Tests receiving empty output/whitespace](https://forum.codecrafters.io/t/qp2-tests-receiving-empty-output-whitespace/16215)

<div class="topic-metadata">

**Author:** [@babanini95](https://forum.codecrafters.io/u/babanini95)\
**Replies:** 4\
**Last updated:** [July 27, 2026, 7:54am UTC](https://forum.codecrafters.io/t/qp2-tests-receiving-empty-output-whitespace/16215 "2026-07-27T07:54:55Z")

</div>

I’m stuck on Stage #QP2. I’ve found some issue that similar to this issue. I’m using linenoise to help me add command autocomplete feature. But somehow the test receiving whitespace when testing previous stage and I can…

---

## [\#TZ2 Failing because of clash with #LC6? Need help!](https://forum.codecrafters.io/t/tz2-failing-because-of-clash-with-lc6-need-help/16199)

<div class="topic-metadata">

**Author:** [@Walheimat](https://forum.codecrafters.io/u/Walheimat)\
**Replies:** 1\
**Last updated:** [July 7, 2026, 6:41pm UTC](https://forum.codecrafters.io/t/tz2-failing-because-of-clash-with-lc6-need-help/16199 "2026-07-07T18:41:05Z")

</div>

I’m stuck on Stage #TZ2 I can’t reproduce the problem locally but it looks like there’s a clash between this task and what #LC6 (directory completion) expects? There you have to complete the first directory if there’s n…

---

## [\#lc6 Failing, not able to replicate the error locally](https://forum.codecrafters.io/t/lc6-failing-not-able-to-replicate-the-error-locally/16192)

<div class="topic-metadata">

**Author:** [@Gautam1608](https://forum.codecrafters.io/u/Gautam1608)\
**Replies:** 2\
**Last updated:** [July 2, 2026, 4:38am UTC](https://forum.codecrafters.io/t/lc6-failing-not-able-to-replicate-the-error-locally/16192 "2026-07-02T04:38:28Z")

</div>

I’m stuck on Stage #lc6 Latest Code: Gautam-Shell/app/main.py at main · Gautam1608/Gautam-Shell · GitHub Code Submit output: \[tester::#LC6\] Running tests for Stage #LC6 (Filename Completion - Directory completion) \[te…

---

## [\#GP4 failing, unsure why](https://forum.codecrafters.io/t/gp4-failing-unsure-why/16194)

<div class="topic-metadata">

**Author:** [@kylexd](https://forum.codecrafters.io/u/kylexd)\
**Replies:** 2\
**Last updated:** [July 2, 2026, 3:54am UTC](https://forum.codecrafters.io/t/gp4-failing-unsure-why/16194 "2026-07-02T03:54:05Z")

</div>

I’m stuck on Stage #GP4 I’ve tried capturing OS-specific home env vars in addition to user.home (which I expect should be all that is needed) and the home directory seems correct but the tests are failing. I think eith…

---

## [Working locally but failing submit #ue6](https://forum.codecrafters.io/t/working-locally-but-failing-submit-ue6/16188)

<div class="topic-metadata">

**Author:** [@Gautam1608](https://forum.codecrafters.io/u/Gautam1608)\
**Replies:** 3\
**Last updated:** [June 30, 2026, 6:50pm UTC](https://forum.codecrafters.io/t/working-locally-but-failing-submit-ue6/16188 "2026-06-30T18:50:57Z")

</div>

I’m stuck on Stage #ue6. Here are my logs: \[tester::#ZV2\] ✓ Prompt line matches "$ wc grape-" \[tester::#ZV2\] Pressed "\<TAB\>" (expecting autocomplete to "wc grape-90.txt" followed by a space) \[your-program\] $ wc grape-g…

---

## [Help needed for #PM5](https://forum.codecrafters.io/t/help-needed-for-pm5/16187)

<div class="topic-metadata">

**Author:** [@HadiSaleemi666](https://forum.codecrafters.io/u/HadiSaleemi666)\
**Replies:** 5\
**Last updated:** [June 29, 2026, 8:16pm UTC](https://forum.codecrafters.io/t/help-needed-for-pm5/16187 "2026-06-29T20:16:24Z")

</div>

So I figured out a lot of problems on this stage and attempted a lot of fixes. This specific error, though, I am not quite sure how to fix or what to do about it. import sys, os, subprocess, shlex, readline redirect…

---

## [\#QP2 submission failing because of a #UN3 failure](https://forum.codecrafters.io/t/qp2-submission-failing-because-of-a-un3-failure/16186)

<div class="topic-metadata">

**Author:** [@aniketpt](https://forum.codecrafters.io/u/aniketpt)\
**Replies:** 5\
**Last updated:** [June 28, 2026, 5:42pm UTC](https://forum.codecrafters.io/t/qp2-submission-failing-because-of-a-un3-failure/16186 "2026-06-28T17:42:29Z")

</div>

When I submitted my solution for stage #QP2, it passed the tests for the target stage, but failed for stage #UN3 (a stage from previous section). My code already passed that stage, so I am trying to understand why its fa…

---

## [Help needed for #YT5](https://forum.codecrafters.io/t/help-needed-for-yt5/16182)

<div class="topic-metadata">

**Author:** [@HadiSaleemi666](https://forum.codecrafters.io/u/HadiSaleemi666)\
**Replies:** 3\
**Last updated:** [June 26, 2026, 5:26pm UTC](https://forum.codecrafters.io/t/help-needed-for-yt5/16182 "2026-06-26T17:26:03Z")

</div>

I’m stuck on Stage #YT5 and it feels like its because of bad programming practices. ive been sitting here for I think around 8 hours straight, probably more tryna figure out what to do. I’ve tried two distinct approache…

---

## [Test not registering prompt on build your own shell in golang](https://forum.codecrafters.io/t/test-not-registering-prompt-on-build-your-own-shell-in-golang/16181)

<div class="topic-metadata">

**Author:** [@hamza-m-masood](https://forum.codecrafters.io/u/hamza-m-masood)\
**Replies:** 4\
**Last updated:** [June 24, 2026, 4:55pm UTC](https://forum.codecrafters.io/t/test-not-registering-prompt-on-build-your-own-shell-in-golang/16181 "2026-06-24T16:55:24Z")

</div>

I’m stuck on Stage #QP2 As you can see by running the same code, the prompt correctly appears. But for some reason the test fails to recognize the prompt. Are the tests open source? Can I view the code on how the test …

---

## [Question regarding #MG5](https://forum.codecrafters.io/t/question-regarding-mg5/16176)

<div class="topic-metadata">

**Author:** [@HadiSaleemi666](https://forum.codecrafters.io/u/HadiSaleemi666)\
**Replies:** 2\
**Last updated:** [June 24, 2026, 4:37am UTC](https://forum.codecrafters.io/t/question-regarding-mg5/16176 "2026-06-24T04:37:36Z")

</div>

Hello, hope everyone’s doing well. I have a question regarding #MG5. I’m currently working on a windows device and I realized after testing that the code requires the answer to be in a posix format? because when I attemp…

---

## [Potentially incorrect tests](https://forum.codecrafters.io/t/potentially-incorrect-tests/16175)

<div class="topic-metadata">

**Author:** [@hamza-m-masood](https://forum.codecrafters.io/u/hamza-m-masood)\
**Replies:** 2\
**Last updated:** [June 22, 2026, 3:41pm UTC](https://forum.codecrafters.io/t/potentially-incorrect-tests/16175 "2026-06-22T15:41:29Z")

</div>

I’m stuck on Stage #JV1 I’ve tried to correct my program but I’m pretty sure my cat command is working as expected. I can cat a file correctly, and I can also cat a file to redirect to another file. I can then cat the f…

---

## [I'm Stuck on #MG5 of the Shell Building project](https://forum.codecrafters.io/t/im-stuck-on-mg5-of-the-shell-building-project/16174)

<div class="topic-metadata">

**Author:** [@Jishnu-Ray](https://forum.codecrafters.io/u/Jishnu-Ray)\
**Replies:** 2\
**Last updated:** [June 21, 2026, 6:06pm UTC](https://forum.codecrafters.io/t/im-stuck-on-mg5-of-the-shell-building-project/16174 "2026-06-21T18:06:27Z")

</div>

I’m stuck on Stage #MG5. I have done everything write I think but the test script tests for cat tool in “/usr/bin/” directory which is not possible since I’m on Windows. Is it not possible to pass this in Windows? Ple…

---

## [C++ Build a shell runs locally but fails when using codecrafters submit](https://forum.codecrafters.io/t/c-build-a-shell-runs-locally-but-fails-when-using-codecrafters-submit/16171)

<div class="topic-metadata">

**Author:** [@Edt12](https://forum.codecrafters.io/u/Edt12)\
**Replies:** 2\
**Last updated:** [June 19, 2026, 10:23am UTC](https://forum.codecrafters.io/t/c-build-a-shell-runs-locally-but-fails-when-using-codecrafters-submit/16171 "2026-06-19T10:23:16Z")

</div>

Hi I am on stage 8 type command of the c++ shell challenge I have a working solution on my machine however when i do codecrafters submit i get the following error. \[compile\] Compilation successful. Debug = true \[tester…

---

## [Bug report on tester for #FY4: incorrect logic passed the test](https://forum.codecrafters.io/t/bug-report-on-tester-for-fy4-incorrect-logic-passed-the-test/16165)

<div class="topic-metadata">

**Author:** [@skuong](https://forum.codecrafters.io/u/skuong)\
**Replies:** 4\
**Last updated:** [June 19, 2026, 7:52am UTC](https://forum.codecrafters.io/t/bug-report-on-tester-for-fy4-incorrect-logic-passed-the-test/16165 "2026-06-19T07:52:30Z")

</div>

After I done #BV8, I passed #FY4 automatically even though my logic isn’t correct for #FY4. Based on the instruction on #FY4, my implementation is wrong but the test doesn’t handle it. Here is the instruction: For exa…

---

## [My program failed and the tester's error message is not clear. Quite confusing considering information available in the instruction](https://forum.codecrafters.io/t/my-program-failed-and-the-testers-error-message-is-not-clear-quite-confusing-considering-information-available-in-the-instruction/16164)

<div class="topic-metadata">

**Author:** [@skuong](https://forum.codecrafters.io/u/skuong)\
**Replies:** 2\
**Last updated:** [June 12, 2026, 6:26am UTC](https://forum.codecrafters.io/t/my-program-failed-and-the-testers-error-message-is-not-clear-quite-confusing-considering-information-available-in-the-instruction/16164 "2026-06-12T06:26:08Z")

</div>

I’m stuck on Stage #EP2. I’ve tried testing locally with this registered specification script: #!/usr/bin/env python3 print("add") print("commit") print("branch") print("cat-file") print("remote") print("rebase") pri…

---

## [Can't proceed with Tests due to tester using wrong path?](https://forum.codecrafters.io/t/cant-proceed-with-tests-due-to-tester-using-wrong-path/16160)

<div class="topic-metadata">

**Author:** [@Bekobii](https://forum.codecrafters.io/u/Bekobii)\
**Replies:** 4\
**Last updated:** [June 5, 2026, 9:56pm UTC](https://forum.codecrafters.io/t/cant-proceed-with-tests-due-to-tester-using-wrong-path/16160 "2026-06-05T21:56:27Z")

</div>

I’m stuck on Stage #IP1 It always gives me following error: \[tester::#IP1\] Expected: “Arg #0 (program name): custom\_exe\_1165” \[tester::#IP1\] Received: “Arg #0 (program name): /tmp/dog/custom\_exe\_1165” This seems to n…

---

## [Running previous testcases before current testcase](https://forum.codecrafters.io/t/running-previous-testcases-before-current-testcase/16156)

<div class="topic-metadata">

**Author:** [@uday19pratap](https://forum.codecrafters.io/u/uday19pratap)\
**Replies:** 2\
**Last updated:** [June 4, 2026, 10:21pm UTC](https://forum.codecrafters.io/t/running-previous-testcases-before-current-testcase/16156 "2026-06-04T22:21:23Z")

</div>

I re-factored some of my code and wanted to run the entire unit-test suite (except the tests related to the latest/current sub-challenge). How can I do that? If I do “codecrafters submit”, then it runs the latest unit-t…

---

## [Challenge: shell : pwd command working fine on my local compiled but failing due to command not found due to path for the pwd binary might not be found](https://forum.codecrafters.io/t/challenge-shell-pwd-command-working-fine-on-my-local-compiled-but-failing-due-to-command-not-found-due-to-path-for-the-pwd-binary-might-not-be-found/16143)

<div class="topic-metadata">

**Author:** [@quantumbit1](https://forum.codecrafters.io/u/quantumbit1)\
**Replies:** 2\
**Last updated:** [June 1, 2026, 12:46pm UTC](https://forum.codecrafters.io/t/challenge-shell-pwd-command-working-fine-on-my-local-compiled-but-failing-due-to-command-not-found-due-to-path-for-the-pwd-binary-might-not-be-found/16143 "2026-06-01T12:46:59Z")

</div>

tried pwd command on my local WSL environment and it is working correctly but when submitted to codecrafters it says that the command is not found. Suspecting if the path is available or not on the station wherever it ch…

---

## [\[Shell\] How to pass the first stage? pls help](https://forum.codecrafters.io/t/shell-how-to-pass-the-first-stage-pls-help/16138)

<div class="topic-metadata">

**Author:** [@javier-is-coding](https://forum.codecrafters.io/u/javier-is-coding)\
**Replies:** 1\
**Last updated:** [May 30, 2026, 8:49am UTC](https://forum.codecrafters.io/t/shell-how-to-pass-the-first-stage-pls-help/16138 "2026-05-30T08:49:17Z")

</div>

Checklist: :white\_check\_mark: or :cross\_mark:: I’ve uncommented the code. :white\_check\_mark: or :cross\_mark:: I’ve saved the changes. :white\_check\_mark: or :cross\_mark:: I’ve run the git commands: git commit -am "\[see…

---

## [\[C\] Build your own shell - Stage #QP2](https://forum.codecrafters.io/t/c-build-your-own-shell-stage-qp2/15689)

<div class="topic-metadata">

**Author:** [@retop56](https://forum.codecrafters.io/u/retop56)\
**Replies:** 3\
**Last updated:** [May 25, 2026, 8:25am UTC](https://forum.codecrafters.io/t/c-build-your-own-shell-stage-qp2/15689 "2026-05-25T08:25:52Z")

</div>

Link to GitHub repo Cannot get program to compile for this stage. \[compile\] app/main.c:5:10: fatal error: readline/readline.h: No such file or directory \[compile\] #include \<readline/readline.h\> \[compile\] ^~~…

---

## [Implementing TAB autocompletion in Elixir - Need guidance](https://forum.codecrafters.io/t/implementing-tab-autocompletion-in-elixir-need-guidance/15685)

<div class="topic-metadata">

**Author:** [@Illuminaxx](https://forum.codecrafters.io/u/Illuminaxx)\
**Replies:** 2\
**Last updated:** [May 25, 2026, 8:23am UTC](https://forum.codecrafters.io/t/implementing-tab-autocompletion-in-elixir-need-guidance/15685 "2026-05-25T08:23:38Z")

</div>

Hi CodeCrafters team, I’m working on the Shell challenge using Elixir and I’m stuck on Stage #QP2 (Tab Autocompletion - Builtin completion). The Problem: The test expects TAB autocompletion to work, but Elixir/Erlang d…

[Next page](https://forum.codecrafters.io/tag/challenge-shell/9.md?match_all_tags=true&page=1&tags%5B%5D=challenge%3Ashell)
