fix(openai): Claude Code 작업 경로 형식을 정규화한다

This commit is contained in:
toki 2026-08-15 15:51:55 +09:00
parent 99a4f75ed1
commit 74b6f0b99c
2 changed files with 12 additions and 1 deletions

View file

@ -330,6 +330,17 @@ func TestHotPathStageInputIsolation(t *testing.T) {
}
}
func TestCallerWorkingDirectoryFromClaudeCodeSystemPrompt(t *testing.T) {
task := "system: runtime context\n- Primary working directory: /workspace/claude-run\nuser: create index.html"
got, err := callerWorkingDirectory(task)
if err != nil {
t.Fatal(err)
}
if want := "/workspace/claude-run"; got != want {
t.Fatalf("caller working directory = %q, want %q", got, want)
}
}
type scriptedLightPoolService struct {
providerFakeRunService
mu sync.Mutex

View file

@ -178,7 +178,7 @@ func callerWorkingDirectory(task string) (string, error) {
break
}
}
for _, prefix := range []string{"Working directory:", "Current working directory:"} {
for _, prefix := range []string{"Working directory:", "Current working directory:", "- Primary working directory:"} {
if !strings.HasPrefix(line, prefix) {
continue
}