fix(v0.4.1): route all workspace commands through SearchRoots

Every resolver, lister, and most-recent caller now passes
config.SearchRoots() so CTASK_PROJECT_ROOT is searched alongside
CTASK_ROOT. Commands use ws.Root when rendering relative paths or
session env vars so displays and CTASK_ROOT exports are correct for
workspaces living under CTASK_PROJECT_ROOT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 17:54:58 -04:00
parent 075000497f
commit 0c1f03ba3a
9 changed files with 26 additions and 24 deletions
+3 -3
View File
@@ -46,8 +46,8 @@ func doResume(query string, container, useShell, force bool, agentOverride strin
return nil
}
root := config.ResolveRoot()
ws := resolveOne(root, query, false)
roots := config.SearchRoots()
ws := resolveOne(roots, query, false)
// Update updated_at
now := time.Now().UTC().Truncate(time.Second)
@@ -62,7 +62,7 @@ func doResume(query string, container, useShell, force bool, agentOverride strin
agent = ws.Meta.Agent
}
envVars := config.EnvVars(ws.Meta.Slug, ws.Meta.Mode, root, ws.Path, ws.Meta.Category, workspace.EffectiveType(ws.Meta))
envVars := config.EnvVars(ws.Meta.Slug, ws.Meta.Mode, ws.Root, ws.Path, ws.Meta.Category, workspace.EffectiveType(ws.Meta))
return session.Run(session.LaunchOpts{
WsDir: ws.Path,