[MODEL]

Resolved 💬 6 comments Opened Oct 28, 2025 by felixniemeyer Closed Jan 9, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Other unexpected behavior

What You Asked Claude to Do

I am working on two node packages at the same time. They share a root folder.
Claude works on both.
One package is using the other package.

I asked it to implement a feature that affected both packages.

What Claude Actually Did

After making updates to package 1 it got lost there and started implementing changes that obviously and explicitly need to go to package 2 into package 1 as well.

Generally speaking: claude often cds into one of them and then forgets about the fact that there are other projects inside the folder where it was started in.

I think the problem is after working a while in a sub directory, claude get's lost in there and forgets that there are other sibling folders or parent folders. Especially if the sub folder contains a project with package.json or whatever project file depending on language and frameworks.

Expected Behavior

Claude should be aware that it changed directory down into the tree, considering moving up again.

Solution might be to remind claude about it's current working directory and it's root directory (where it was started) so that it is aware that it is not currently in the root directory.

Solution might also be to cd into root directory after claude comes to a halt. To avoid the buildup of this conviction that a sub dir is the main working dir.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

just create two packages, start claude in the containing directory, work on one project for a while and then let claude state it's working directory.
It will probably be the sub directory instead of the directory it has been started in.

Claude Model

Sonnet

Relevant Conversation

{"role":"user","content":[{"type":"text","text":"try ls command"}]}
{"role":"assistant","content":[{"type":"text","text":"Ah! We're in the trees-workspace root. I see `web-mapper` subdirectory. So we've been working in `web-mapper/` and now we need to work on the trees app itself. Let me check what's in the current directory structure:"}]}
{"role":"assistant","content":[{"type":"text","text":"Wait, this looks like the `web-mapper/src/` directory - I can see the files we just created (`artwork-renderer.ts`). We must be in `/home/felix/dev/graphics/trees-workspace/web-mapper`. Let me check where the actual trees app is:"}]}
{"role":"assistant","content":[{"type":"text","text":"Right, we're in web-mapper. Let me go up and find the trees app:"}]}
{"role":"assistant","content":[{"type":"text","text":"Perfect! There's a `trees` directory. Let me explore it:"}]}
{"role":"assistant","content":[{"type":"text","text":"Great! Let me check the current main.ts to see what's already set up:"}]}
{"role":"assistant","content":[{"type":"text","text":"Perfect! Now I can see what needs to be added. Let me present the plan:"}]}
{"role":"user","content":[{"type":"text","text":"[Request interrupted by user for tool use]"}]}
{"role":"user","content":[{"type":"text","text":"wait, where the fuck did you implement the triangle strip artwork with the textures and so on? "}]}
{"role":"assistant","content":[{"type":"text","text":"You're right - I didn't! Looking back at the `artwork-renderer.ts` I created, the `updateTexture()` method has a TODO comment and doesn't actually implement the photo-to-texture mapping. It just creates an empty texture.\n\nThe missing piece is: **rendering the photo texture sampled at the correct pixel positions along the strip edges into the generated texture**.\n\nThis would require:\n1. A shader that samples the photo at specific pixel coordinates\n2. Rendering geometry (a quad for each row of the texture) that maps from the photo\n3. For each Y position in the texture (0 to height):\n   - Calculate the normalized distance `t = y / height`\n   - Find pixel positions on even and odd sides at distance `t`\n   - Sample photo at those positions\n   - Write to texture at that Y coordinate\n\nShould I implement this now? It's the core piece that makes the texture actually contain the mapped photo data."}]}
{"role":"user","content":[{"type":"text","text":"no, which files? in the example app in webmapper or where?"}]}
{"role":"assistant","content":[{"type":"text","text":"Looking at what I created:\n\n**Files I created in web-mapper:**\n1. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/artwork-renderer.ts` - The main renderer class (but with incomplete texture generation)\n2. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/shaders/artwork/triangle-strip-flow.vs` - Vertex shader\n3. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/shaders/artwork/triangle-strip-flow.fs` - Fragment shader\n\n**Modified files in web-mapper:**\n1. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/WebMapper.ts` - Added `getPhoto()` method\n2. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/photo-background-renderer.ts` - Added `getTexture()` and `getImage()` methods\n3. `/home/felix/dev/graphics/trees-workspace/web-mapper/src/index.ts` - Exported `TriangleStripArtworkRenderer`\n\nSo it's all in the **web-mapper package**, not in the example-app or trees app. The trees app (in `../trees/`) is still the basic setup from before - I haven't modified it yet."}]}
{"role":"user","content":[{"type":"text","text":"NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. It should be in the fucking trees artwork app. Not in the fucking general web mapper package. FUCK! And since were at the end of the context window, can you please create a .md file how to move all the artwork aspects (the triangle strip texture scrolling) to the trees artwork"}]}

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.0.28 (Claude Code)

Platform

Anthropic API

Additional Context

I have observed often that claude get's confused about its working directory vs root directory when working on monorepos or projects with multiple packages.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗