Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Claude Code is sandboxed to your current directory. Building an web app that imports from a shared SDK that's outside the current directory? /add-dir ../sdk Now Claude sees both and can read and edit both. No symlinks. No switching sessions.

127,803 görüntüleme • 9 ay önce •via X (Twitter)

32 Yorum

Gordon Mickel profil fotoğrafı
Gordon Mickel9 ay önce

Bad me for just running with --allow-dangerously-skip-permissions and telling it to go look in the other directory 😈

Ado profil fotoğrafı
Ado9 ay önce

I mean danger is in the name and some of us like to live on the edge. 🤷

Mike Mickelson profil fotoğrafı
Mike Mickelson9 ay önce

sandboxing is for people who back up their code

BrianMcGrath profil fotoğrafı
BrianMcGrath9 ay önce

Love this. Makes working with component libraries, shared types, or utility packages alongside the main app seamless. No more context fragmentation.

M.en profil fotoğrafı
M.en9 ay önce

This sandboxing workaround is genuinely clever for monorepo workflows. It directly solves the "shared dependency" problem that breaks so many AI coding sessions.

mee seen profil fotoğrafı
mee seen9 ay önce

I have all my projects in one workspace and I launch claude from workspace, it automatically gets all folder access

Jason profil fotoğrafı
Jason9 ay önce

claude --dangerously-skip-permissions

Akram profil fotoğrafı
Akram9 ay önce

thanks for the info

JFPuget 🇫🇷🇺🇦🇨🇦🇬🇱 profil fotoğrafı
JFPuget 🇫🇷🇺🇦🇨🇦🇬🇱9 ay önce

How is it better than using a symlink?

Muzaffar profil fotoğrafı
Muzaffar9 ay önce

this wold have so much of my time. I create a fullstack with Next, mongo and prisma. After that, I moved the backend to modal cloud and volume-based architecture. There I had to go back and forth a lot, had to create a know file to transfer it. Now I can just use this and make two repos sync with each other. thanks for this

Alan profil fotoğrafı
Alan9 ay önce

I tried messing around with SDK’s last night. I realise that you have to pay for the API which I don’t think I’m quite ready yet because I don’t have a solid project that I think I want to work on with that function.

United Records profil fotoğrafı
United Records9 ay önce

logical

Marcin Dudek | WordPress speed + AI profil fotoğrafı
Marcin Dudek | WordPress speed + AI9 ay önce

But it’s not sandboxed by default. Or it can be disabled. Then it will just ask if it needs to read outside of its pwd.

Larry Diffey profil fotoğrafı
Larry Diffey9 ay önce

It's always just gone to other directories when I tell it where something is. Did that just change?

Anonymouse profil fotoğrafı
Anonymouse9 ay önce

@bcherny You can also….this is working correctly in another project at “../other-project”. Analyze and make this project work similar. It will ask permission and read the other dir.

gerry🗯 profil fotoğrafı
gerry🗯9 ay önce

I don't actually understand this. I seem to be able to at least read files outside the current directory just by asking Claude. (dangerously-skip is off)

archivedvideos profil fotoğrafı
archivedvideos9 ay önce

Nice! Btw fast path autocompletion on Claude code would be nice

Toast profil fotoğrafı
Toast9 ay önce

just add to the project’s the directory you use. or if you have specific linkages to different repos you will always use, add it to the overall

River profil fotoğrafı
River9 ay önce

It definitely isn't sanboxed and I've never used this /add-dir command. I just ask claude to do things in any specific dir and it happily does.

Jukka profil fotoğrafı
Jukka9 ay önce

I guess sandboxing does not prevent eg. cat file.txt && rm -rf ~

robertus profil fotoğrafı
robertus9 ay önce

the quiet quality of life feature. context bleed is friction. anything reducing friction on what's actually in the repo is worth 10 flashy features.

Leadlyx profil fotoğrafı
Leadlyx9 ay önce

Exactly.

cepo.ai profil fotoğrafı
cepo.ai9 ay önce

Will this solve the problem where I use git worktrees and Claude code keeps prompting me for permissions?

Andy Heynderickx profil fotoğrafı
Andy Heynderickx9 ay önce

@bcherny Exactly what I needed (frontend and API without shuffling the openapi.json to the frontend and every little change). Will it be aware of the chosen language for each solution though, or will it try to shove Flutter down FastAPI's rear end?

guzus profil fotoğrafı
guzus9 ay önce

Now I don’t have to use symlink anymore. Good tip

Pax2Crypto ∞ ₿ Ξ🦇🔊 profil fotoğrafı
Pax2Crypto ∞ ₿ Ξ🦇🔊9 ay önce

Noice, very noice...

Gill profil fotoğrafı
Gill9 ay önce

Nice—explicit directory whitelisting beats symlinks. Cleaner security model, better DX.

Jithin Palepu profil fotoğrafı
Jithin Palepu9 ay önce

this is pretty cool. it's nice to see tools that make development smoother. simplifies things a lot, especially when you're juggling multiple directories. makes me think about how First100 can help marketers streamline their processes too. having everything accessible without extra hassle is key.

Konstantin profil fotoğrafı
Konstantin9 ay önce

this is half the sandbox problem. the other half: your memory and states are trapped in dotfiles that don't really scale across sessions/machines. built something for that

Melvyn • Builder profil fotoğrafı
Melvyn • Builder9 ay önce

skip permissions and he can even read you're password file

Cameron Westland profil fotoğrafı
Cameron Westland9 ay önce

I do exactly this for `frontend` `backend` `library` etc since my startup has many repos. Really useful to see across projects.

Cool profil fotoğrafı
Cool9 ay önce

Is this the way you work with multiple related projects that are in different directories? Or what is the best practice? (Like a frontend and backend project that are in different locations on your machine)

Benzer Videolar