Pi extension for async subagent delegation with truncation, artifacts, and session sharing
This report presents the forensic synthetic code analysis of nicobailon/pi-subagents, a TypeScript project with 3,044 GitHub stars. SynthScan v2.0 examined 139,747 lines of code across 383 source files, recording 498 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 498 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/unit/schemas.test.ts | 122 | function hasAnyOfArrayWithStringItems(schema: JsonSchemaNode | undefined): boolean { | CODE |
| LOW | test/unit/pi-coding-agent-dir.test.ts | 42 | function assertPrivateHistoryModes(historyPath: string): void { | CODE |
| LOW | test/unit/completion-guard.test.ts | 294 | function checkpointNestedDetailsMessage(beforeCommit: string, afterCommit: string): Message { | CODE |
| LOW | test/unit/host-peer-runtime-imports.test.ts | 25 | function extractStaticImportSpecifiers(source: string): string[] { | CODE |
| LOW | test/unit/tool-description.test.ts | 144 | function readRegisteredDescription(agentDir: string): string { | CODE |
| LOW | test/unit/windows-hide-spawn.test.ts | 9 | function assertNestedPiSpawnHidesWindows(sourcePath: string): void { | CODE |
| LOW | test/integration/fork-context-execution.test.ts | 61 | function makeSessionManagerRecorder(options: SessionStubOptions = {}) { | CODE |
| LOW | test/integration/fork-context-execution.test.ts | 132 | function makeExecutorWithDiscoverAgents(discoverAgentsImpl: typeof discoverAgents, config: Record<string, unknown> = {} | CODE |
| LOW | test/integration/fork-context-execution.test.ts | 209 | function makeForkingSessionManagerRecorder(options: { sessionFile: string; leafId: string }) { | CODE |
| LOW | test/integration/fork-context-execution.test.ts | 280 | function makeSignedThinkingSessionManager(childSessionFile: string) { | CODE |
| LOW | test/integration/async-execution.test.ts | 343 | async function waitForDeferredTurnBudget(id: string, timeoutMs = 10_000): Promise<AsyncStatusPayload> { | CODE |
| LOW | test/integration/slash-commands.test.ts | 218 | async function captureSlashCommandParams( | CODE |
| LOW | test/support/real-session-runner.ts | 50 | export function routeParentThroughSubagent(input: { | CODE |
| LOW | test/support/real-session-runner.ts | 75 | function latestSubagentToolResultText(messages: Array<{ role?: string; toolName?: string; content?: unknown }>): string | CODE |
| LOW | src/extension/doctor.ts | 109 | function formatConfiguredSessionDir(input: DoctorReportInput): string { | CODE |
| LOW | src/extension/doctor.ts | 178 | function formatPermissionSystemSection(): string[] { | CODE |
| LOW | src/extension/steering-notices.ts | 21 | export function handleSubagentSteeringNotice(input: { | CODE |
| LOW | src/extension/control-notices.ts | 19 | export function formatSubagentControlNotice(details: SubagentControlMessageDetails, content?: string): string { | CODE |
| LOW | src/extension/control-notices.ts | 44 | export function handleSubagentControlNotice(input: { | CODE |
| LOW | src/extension/schemas.ts | 28 | function isTopLevelParameterDescription(path: string[]): boolean { | CODE |
| LOW | src/extension/rpc.ts | 622 | export function registerSubagentRpcBridge(options: RegisterSubagentRpcBridgeOptions): { | CODE |
| LOW | src/extension/fanout-child.ts | 53 | function resolveNestedControlRoute(): NestedRoute | undefined { | CODE |
| LOW | src/extension/fanout-child.ts | 76 | function createNestedControlInboxState(): NestedControlInboxState { | CODE |
| LOW | src/extension/fanout-child.ts | 80 | function startNestedControlInboxListener(pi: ExtensionAPI, state: SubagentState, route: NestedRoute, inboxState: NestedC | CODE |
| LOW | src/extension/fanout-child.ts | 147 | export default function registerFanoutChildSubagentExtension(pi: ExtensionAPI): void { | CODE |
| LOW | src/extension/tool-description.ts | 68 | export function resolveToolDescriptionMode(config: Pick<ExtensionConfig, "toolDescriptionMode">, options?: ToolDescripti | CODE |
| LOW | src/extension/tool-description.ts | 107 | function loadCustomToolDescription(options?: ToolDescriptionOptions): string | undefined { | CODE |
| LOW | src/extension/tool-description.ts | 144 | function withMandatorySafetyGuidance(description: string): string { | CODE |
| LOW | src/extension/tool-description.ts | 155 | export function buildSubagentToolDescription(config: Pick<ExtensionConfig, "toolDescriptionMode"> = {}, options?: ToolDe | CODE |
| LOW | src/extension/index.ts | 245 | function isStaleExtensionContextError(error: unknown): boolean { | CODE |
| LOW | src/extension/index.ts | 249 | function rebuildSlashResultContainer( | CODE |
| LOW | src/extension/index.ts | 263 | function createSlashResultComponent( | CODE |
| LOW | src/extension/index.ts | 312 | export default function registerSubagentExtension(pi: ExtensionAPI): void { | CODE |
| LOW | src/extension/config.ts | 12 | export function resolveScheduledStoreRoot(value: string): string { | CODE |
| LOW | src/extension/config.ts | 18 | function validateScheduledRunsConfig(value: unknown): void { | CODE |
| LOW | src/missions/goal-driver.ts | 118 | export function collectGoalContinuationNotices(input: { | CODE |
| LOW | src/missions/lifecycle.ts | 167 | export function attachMissionToLaunchResult(input: { | CODE |
| LOW | src/missions/lifecycle.ts | 286 | export function syncMissionFromAsyncCompletion(value: unknown): MissionRecord | undefined { | CODE |
| LOW | src/missions/workflow-state.ts | 198 | export function createMissionWorkflowState(location: MissionStoreLocation, missionId: string): MissionWorkflowState { | CODE |
| LOW | src/missions/store.ts | 230 | export function validateMissionStoreConfig(value: unknown, label = "config.missions"): MissionStoreConfig | undefined { | CODE |
| LOW | src/missions/store.ts | 254 | export function resolveMissionStoreLocation(input: { | CODE |
| LOW | src/tui/render.ts | 171 | export function clearLegacyResultAnimationTimer(context: LegacyResultAnimationContext): void { | CODE |
| LOW | src/tui/render.ts | 188 | function hasEmptyTextOutputWithoutOutputTarget(task: string, output: string): boolean { | CODE |
| LOW | src/tui/render.ts | 294 | function semanticResultPresentation(input: { | CODE |
| LOW | src/tui/render.ts | 534 | function widgetParallelAgentDetails(job: AsyncJobState, theme: Theme, expanded = false, width = getTermWidth()): string[ | CODE |
| LOW | src/tui/render.ts | 551 | function parseParallelGroupAgentCount(label: string | undefined): number | undefined { | CODE |
| LOW | src/tui/render.ts | 1009 | function foregroundStyleWidgetStepLines( | CODE |
| LOW | src/tui/render.ts | 1049 | function foregroundStyleWidgetDetails(job: AsyncJobState, theme: Theme, expanded: boolean, width: number, frame?: number | CODE |
| LOW | src/tui/render.ts | 1120 | function estimateAvailableWidgetRows(): number { | CODE |
| LOW | src/tui/render.ts | 1150 | function buildSingleLineWidgetLines(jobs: AsyncJobState[], theme: Theme, width: number, frame?: number): string[] { | CODE |
| LOW | src/tui/render.ts | 1252 | function buildProgressiveWidgetLines(jobs: AsyncJobState[], theme: Theme, width: number, lockedRows: number, previousKey | CODE |
| LOW | src/tui/render.ts | 1278 | function collapsedWidgetLineBudget(rows: number): number { | CODE |
| LOW | src/tui/render.ts | 1499 | function renderWorkflowChatProgress(d: Details, result: AgentToolResult<Details>, theme: Theme, frame?: number): Compone | CODE |
| LOW | src/tui/fleet-status.ts | 47 | export function resolveFleetViewPlacement(value: unknown): FleetViewPlacement { | CODE |
| LOW | src/tui/fleet-status.ts | 140 | function isStaleExtensionContextError(error: unknown): boolean { | CODE |
| LOW | src/tui/fleet-status.ts | 147 | export function collectFleetStatusEntries(state: SubagentState): FleetStatusEntry[] { | CODE |
| LOW | src/intercom/native-supervisor-channel.ts | 89 | export function resolveSupervisorChannelDir(runId: string, agent: string, childIndex: number): string { | CODE |
| LOW | src/intercom/native-supervisor-channel.ts | 93 | export function ensureSupervisorChannelDir(channelDir: string): void { | CODE |
| LOW | src/intercom/native-supervisor-channel.ts | 290 | export function registerNativeSupervisorClient(pi: ExtensionAPI, options: { includeIntercomFallback?: boolean } = {}): v | CODE |
| LOW | src/intercom/native-supervisor-channel.ts | 393 | function removeStaleEmptySupervisorChannel(channelDir: string, nowMs: number): boolean { | CODE |
| 422 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/runs/foreground/chain-clarify.ts | 265 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/runs/foreground/chain-clarify.ts | 267 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/runs/foreground/chain-clarify.ts | 314 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/runs/foreground/chain-clarify.ts | 316 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/runs/foreground/chain-clarify.ts | 374 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/runs/foreground/chain-clarify.ts | 376 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | CHANGELOG.md | 1163 | - Removed exported `resolveSessionRoot()` function and `SessionRootInput` interface. These were introduced by PR #46 but | CODE |
| MEDIUM | docs/workflows.md | 1 | # Workflows and orchestration | COMMENT |
| MEDIUM | docs/workflows.md | 5 | ## Recommended orchestration pattern | COMMENT |
| MEDIUM | skills/pi-subagents/references/prompting-and-roles.md | 102 | ### Staged fix orchestration technique | COMMENT |
| MEDIUM | …lls/pi-subagents/references/constraints-and-recipes.md | 26 | ### Prefer async orchestration | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/tui/render.ts | 645 | kind: "placeholder"; | CODE |
| LOW | src/tui/render.ts | 661 | kind: "placeholder", | CODE |
| LOW | src/tui/render.ts | 1582 | if (entry.kind === "placeholder") { | CODE |
| LOW | src/tui/render.ts | 1909 | if (entry.kind === "placeholder") { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/extension/rpc.ts | 532 | async function handleRequest( | CODE |