Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 9 месяцев назад •via X (Twitter)

Комментарии: 32

Фото профиля Gordon Mickel
Gordon Mickel9 месяцев назад

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

Фото профиля Ado
Ado9 месяцев назад

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

Фото профиля Mike Mickelson
Mike Mickelson9 месяцев назад

sandboxing is for people who back up their code

Фото профиля BrianMcGrath
BrianMcGrath9 месяцев назад

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

Фото профиля M.en
M.en9 месяцев назад

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
mee seen9 месяцев назад

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

Фото профиля Jason
Jason9 месяцев назад

claude --dangerously-skip-permissions

Фото профиля Akram
Akram9 месяцев назад

thanks for the info

Фото профиля JFPuget 🇫🇷🇺🇦🇨🇦🇬🇱
JFPuget 🇫🇷🇺🇦🇨🇦🇬🇱9 месяцев назад

How is it better than using a symlink?

Фото профиля Muzaffar
Muzaffar9 месяцев назад

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
Alan9 месяцев назад

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
United Records9 месяцев назад

logical

Фото профиля Marcin Dudek | WordPress speed + AI
Marcin Dudek | WordPress speed + AI9 месяцев назад

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
Larry Diffey9 месяцев назад

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

Фото профиля Anonymouse
Anonymouse9 месяцев назад

@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🗯
gerry🗯9 месяцев назад

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
archivedvideos9 месяцев назад

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

Фото профиля Toast
Toast9 месяцев назад

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
River9 месяцев назад

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
Jukka9 месяцев назад

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

Фото профиля robertus
robertus9 месяцев назад

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
Leadlyx9 месяцев назад

Exactly.

Фото профиля cepo.ai
cepo.ai9 месяцев назад

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

Фото профиля Andy Heynderickx
Andy Heynderickx9 месяцев назад

@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
guzus9 месяцев назад

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

Фото профиля Pax2Crypto ∞ ₿ Ξ🦇🔊
Pax2Crypto ∞ ₿ Ξ🦇🔊9 месяцев назад

Noice, very noice...

Фото профиля Gill
Gill9 месяцев назад

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

Фото профиля Jithin Palepu
Jithin Palepu9 месяцев назад

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
Konstantin9 месяцев назад

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
Melvyn • Builder9 месяцев назад

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

Фото профиля Cameron Westland
Cameron Westland9 месяцев назад

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

Фото профиля Cool
Cool9 месяцев назад

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)

Похожие видео