fix(coding-agent/session): suppressed subagent breadcrumbs so --continue resumes the parent session
- Added a `suppressBreadcrumb` option to `SessionManager.open()` so headless opens skip writing the per-TTY `--continue` breadcrumb, and passed it from the subagent opens in `task/executor.ts` and the HTML export open in `export/html/index.ts`, which run in the parent's terminal and were clobbering the breadcrumb with their own artifact-dir session file. - Added `resolveBreadcrumbToInteractiveRoot()` and applied it in `continueRecent()` so already-poisoned breadcrumbs pointing inside a parent's artifacts dir (`<parent>/<agentId>.jsonl`) resolve back up to the top-level interactive session. - Added `subagent-breadcrumb.test.ts` covering both that a subagent open keeps `--continue` on the parent and that a stale subagent-pointing breadcrumb is recovered.
This commit is contained in:
@@ -242,7 +242,7 @@ export async function exportFromFile(inputPath: string, options?: ExportOptions
|
||||
|
||||
let sm: SessionManager;
|
||||
try {
|
||||
sm = await SessionManager.open(inputPath);
|
||||
sm = await SessionManager.open(inputPath, undefined, undefined, { suppressBreadcrumb: true });
|
||||
} catch (err) {
|
||||
if (isEnoent(err)) throw new Error(`File not found: ${inputPath}`);
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user