# Stage #IZ3 exit regression after adding

**URL:** <https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [June 8, 2025, 1:49am UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817 "2025-06-08T01:49:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![x86-assembly](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/x86-assembly/32/12516_2.png) [@x86-assembly](https://forum.codecrafters.io/u/x86-assembly)\
**Post date:** [June 8, 2025, 1:49am UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/1 "2025-06-08T01:49:25Z")

</div>

I added support for the echo builtin, but my exit builtin is now broken. It works locally, I added some debug prints, but it fails remotely.

For some reason, on remote the last `exit 0` says it gets 3 arguments, where the last one is just an empty string. But I can’t reproduce this locally.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/9/934288d5a65c56ec396d9df2b1941fcfefacdbce.png)  
(first is remote, second locally)

My repo: [assembly/cc-shell - Codeberg.org](https://codeberg.org/assembly/cc-shell)

any help is appreciated

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [June 8, 2025, 11:17pm UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/4 "2025-06-08T23:17:40Z")

</div>

Hey @x86-assembly, looks like you’ve resolved the issue. Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

---

<div class="post-metadata">

**Author:** ![x86-assembly](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/x86-assembly/32/12516_2.png) [@x86-assembly](https://forum.codecrafters.io/u/x86-assembly)\
**Post date:** [June 9, 2025, 1:45pm UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/6 "2025-06-09T13:45:32Z")

</div>

Hi, @andy1li . I didn’t actually solve it, I just made it so exit ignored all additional arguments.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [June 15, 2025, 4:33am UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/8 "2025-06-15T04:33:16Z")

</div>

@x86-assembly I can reproduce the error locally like this:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/9/9b80d6eed4d37f8ac67287377e046dd934fc6d9f.png)

This suggests the bug lies within `parse_command`. You might want to try using `strtok()` instead.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [June 22, 2025, 5:18am UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/10 "2025-06-22T05:18:04Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [June 27, 2025, 5:18am UTC](https://forum.codecrafters.io/t/stage-iz3-exit-regression-after-adding/11817/11 "2025-06-27T05:18:31Z")

</div>

Closed on June 27, 2025, 5:18am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
