Skip to content

Commit 21f718c

Browse files
Remove Ralph worktree path restrictions
The permission.ask hook was incorrectly treating permission patterns as filesystem paths, causing legitimate operations inside the worktree to be denied. The worktree itself provides natural isolation.
1 parent 63e374b commit 21f718c

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

packages/memory/src/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,21 +1245,6 @@ export function createMemoryPlugin(config: PluginConfig): Plugin {
12451245
output.status = 'deny'
12461246
return
12471247
}
1248-
1249-
if (state.inPlace) return
1250-
1251-
const allWithinWorktree = req.patterns.every((p) => {
1252-
const resolved = p.startsWith('/') ? p : resolve(state.worktreeDir, p)
1253-
return resolved === state.worktreeDir || resolved.startsWith(state.worktreeDir + '/')
1254-
})
1255-
1256-
if (allWithinWorktree) {
1257-
output.status = 'allow'
1258-
return
1259-
}
1260-
1261-
logger.log(`Ralph: denied permission outside worktree for session ${req.sessionID}`)
1262-
output.status = 'deny'
12631248
},
12641249
'experimental.session.compacting': async (input, output) => {
12651250
logger.log(`Compacting triggered`)

0 commit comments

Comments
 (0)