Stateful agents that are like people, with memory, identity, and the ability to learn and adapt
This report presents the forensic synthetic code analysis of letta-ai/letta-code, a TypeScript project with 2,972 GitHub stars. SynthScan v2.0 examined 481,582 lines of code across 1851 source files, recording 2430 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 6.7 places this repository in the Low AI signal 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 2430 distinct pattern matches across 13 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 | build.js | 47 | function rewriteDeclarationAliases(typesRoot) { | CODE |
| LOW | docs/examples/mods/memory-citations.ts | 67 | function looksLikeMemoryRelativePath(value: string): boolean { | CODE |
| LOW | docs/examples/mods/memory-citations.ts | 124 | function extractBashMemoryReferences( | CODE |
| LOW | docs/examples/mods/memory-citations.ts | 195 | function createCitationInstruction(): string { | CODE |
| LOW | hooks/memory_logger.py | 58 | def get_api_key_from_keychain() -> Optional[str]: | CODE |
| LOW | scripts/check-skill-frontmatter.js | 53 | function checkSkillFrontmatterName(content) { | CODE |
| LOW | src/memory-confinement.ts | 22 | export function createMemoryConfinementLauncher( | CODE |
| LOW | src/headless-backend-lifecycle.test.ts | 13 | function expectManagedPromptUpdatesViaBackend(source: string): void { | CODE |
| LOW | src/mcp-oauth.ts | 223 | async function startOAuthCallbackServerOnPort( | CODE |
| LOW | src/headless-memfs-policy.ts | 14 | export function resolveHeadlessMemfsPolicy( | CODE |
| LOW | src/startup-auto-update.ts | 7 | export function startStartupAutoUpdateCheck( | CODE |
| LOW | src/settings-manager.ts | 205 | export function shouldPersistSessionState(): boolean { | CODE |
| LOW | src/settings-manager.ts | 226 | function getLocalBackendSettingsKey(): string { | CODE |
| LOW | src/settings-manager.ts | 234 | function isAgentIdCompatibleWithServerKey( | CODE |
| LOW | src/settings-manager.ts | 246 | function isSessionCompatibleWithServerKey( | CODE |
| LOW | src/settings-manager.ts | 260 | function shouldSkipLegacyLocalBackendSessionFallback(): boolean { | CODE |
| LOW | src/maintainability-checks.test.ts | 143 | "export function resolveSlackAccountDisplayName(): string { return 'Slack'; }\n", | CODE |
| LOW | src/headless-bidirectional-reflection.test.ts | 108 | async function runBidirectionalReflectionScenario(): Promise<BidirectionalReflectionSummary> { | CODE |
| LOW | src/headless-bidirectional-reflection.test.ts | 323 | async function waitForReflectionProgress( | CODE |
| LOW | src/release-notes.ts | 51 | function getOrderedReleaseNoteVersions(): string[] { | CODE |
| LOW | src/release-notes.ts | 64 | export function getPendingReleaseNoteVersions( | CODE |
| LOW | src/headless-approval-recovery.test.ts | 92 | "async function recoverPendingApprovalsFromControlRequest(", | CODE |
| LOW | src/headless-approval-recovery.test.ts | 107 | expect(source).toContain("async function sendScopedApprovalMessages("); | CODE |
| LOW | src/headless-approval-recovery.test.ts | 110 | "async function sendScopedApprovalMessages(", | CODE |
| LOW | src/mock-isolation-check.test.ts | 151 | export function isTelegramRuntimeInstalled() { return true; } | CODE |
| LOW | src/mock-isolation-check.test.ts | 153 | export async function ensureTelegramRuntimeInstalled() { return false; } | CODE |
| LOW | src/app-server-client.ts | 156 | export function resolveAppServerChannelUrl( | CODE |
| LOW | src/runtime-context.ts | 77 | function getProcessWorkingDirectory(): string | null { | CODE |
| LOW | src/runtime-context.ts | 85 | export function getFallbackWorkingDirectory(): string { | CODE |
| LOW | src/runtime-context.ts | 103 | export function getCurrentWorkingDirectory(): string { | CODE |
| LOW | src/runtime-context.ts | 134 | export function consumeWorkingDirectoryRecovery(): string | null { | CODE |
| LOW | src/headless-mod-adapter.ts | 162 | export async function emitHeadlessConversationOpen(options: { | CODE |
| LOW | src/headless-mod-adapter.ts | 181 | export async function emitHeadlessConversationClose(options: { | CODE |
| LOW | src/index.ts | 99 | function normalizeUpdateCommandAliases(args: string[]): string[] { | CODE |
| LOW | src/index.ts | 367 | function getStartupTargetLookupOrderForCredentials({ | CODE |
| LOW | src/index.ts | 451 | async function resolveConversationAcrossBackends( | CODE |
| LOW | src/index.ts | 505 | function isLocalBackendTranscriptStartupError(error: unknown): boolean { | CODE |
| LOW | src/index.ts | 514 | async function getLocalBackendStartupFallbackSession( | CODE |
| LOW | src/headless.ts | 238 | function trackHeadlessBoundaryError( | CODE |
| LOW | src/headless.ts | 262 | async function reportStartupErrorAndExit( | CODE |
| LOW | src/headless.ts | 291 | export function mergeBidirectionalQueuedInput( | CODE |
| LOW | src/headless.ts | 299 | function trackTelemetryUserInputFromContent( | CODE |
| LOW | src/headless.ts | 310 | function shouldTrackTelemetryForQueuedMessage( | CODE |
| LOW | src/headless.ts | 316 | function contentToTaskNotificationText( | CODE |
| LOW | src/headless.ts | 330 | function toBidirectionalQueuedInput( | CODE |
| LOW | src/headless.ts | 463 | async function prepareHeadlessToolExecutionContext(params: { | CODE |
| LOW | src/headless.ts | 508 | async function emitHeadlessTurnStartCancellationOutput(options: { | CODE |
| LOW | src/headless.ts | 565 | function writeBidirectionalTurnStartCancellation(options: { | CODE |
| LOW | src/headless.ts | 653 | async function sendScopedApprovalMessages(params: { | CODE |
| LOW | src/headless.ts | 774 | async function waitForEnvironmentAssistantMessage(params: { | CODE |
| LOW | src/headless.ts | 864 | function buildEnvironmentResponseMetadata(params: { | CODE |
| LOW | src/headless.ts | 895 | function isCloudEnvironmentSelector( | CODE |
| LOW | src/headless.ts | 903 | function getEnvironmentRoutedMessagingUnsupportedReason( | CODE |
| LOW | src/headless.ts | 4200 | async function recoverPendingApprovalsFromControlRequest( | CODE |
| LOW | src/websocket/listen-client-concurrency.test.ts | 376 | function makeRecoveredApprovalState(params: { | CODE |
| LOW | src/websocket/listen-interrupt-queue.test.ts | 871 | function computeEffectiveStopReason( | CODE |
| LOW | src/websocket/app-server-openai-tools.ts | 182 | function normalizeToolReturnOutput(value: unknown): string { | CODE |
| LOW | src/websocket/app-server-openai-tools.ts | 328 | export function createToolLifecycleTracker( | CODE |
| LOW | src/websocket/app-server-openai-tools.ts | 335 | function getOrCreate(toolCallId: string): ToolCallState { | CODE |
| LOW | src/websocket/app-server-openai-tools.ts | 500 | export function collectToolLifecycleEvents( | CODE |
| 1943 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | hooks/memory_logger.py | 160 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | hooks/memory_logger.py | 162 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 32 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 34 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 110 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 112 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 249 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 251 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 313 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 315 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 371 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 373 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 584 | # ============================================================================= | COMMENT |
| MEDIUM | hooks/memory_logger.py | 586 | # ============================================================================= | COMMENT |
| MEDIUM | src/discord-debounce.test.ts | 8 | // ── resolveDiscordInboundDebounceMs ─────────────────────────────────── | COMMENT |
| MEDIUM | src/discord-debounce.test.ts | 130 | // ── buildDiscordDebounceKey ─────────────────────────────────────────── | COMMENT |
| MEDIUM | src/headless-queue-lifecycle.test.ts | 26 | // ── Helpers mirroring production logic ─────────────────────────── | COMMENT |
| MEDIUM | src/headless-queue-lifecycle.test.ts | 72 | // ── Shared queue builder ────────────────────────────────────────── | COMMENT |
| MEDIUM | src/headless-queue-lifecycle.test.ts | 145 | // ── Tests ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/headless.ts | 3864 | // ── Queue lifecycle tracking (stream-json only) ──────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 45 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 47 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 99 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 101 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 113 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 115 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 290 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.ts | 292 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.test.ts | 10 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.test.ts | 12 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.test.ts | 126 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/app-server-openai-tools.test.ts | 128 | // ───────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listen-queue-events.test.ts | 26 | // ── Helpers ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listen-queue-events.test.ts | 121 | // ── Tests ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/terminal-handler.ts | 121 | // ── Bun spawn ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/terminal-handler.ts | 200 | // ── node-pty spawn (Node.js / Electron) ─────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/terminal-handler.ts | 268 | // ── Public API ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/websocket/listener/protocol-outbound.ts | 818 | // ───────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/websocket/listener/protocol-outbound.ts | 820 | // ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/worktree-watcher.ts | 111 | // ─── Internal ──────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 20 | // ── Ripgrep binary resolution ────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 36 | // ── Ripgrep JSON stream shapes ───────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 84 | // ── Public API ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 157 | // ── Execution ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 191 | // ── Parsing ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/grep-in-files.ts | 338 | // ── Helpers ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 436 | // ── Enable memfs command ──────────────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 487 | // ── Memory history (git log for a specific file) ───────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 541 | // ── Memory file at ref (git show for content at a commit) ──────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 594 | // ── Memory commit diff (git show for full commit patch) ──────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 645 | // ── Read a file from the MemFS working tree ─────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 749 | // ── Write a file into MemFS (durable agent memory write + commit) ─────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 781 | // ── Validate relative path ───────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 803 | // ── Ensure MemFS is enabled and checked out ─────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 821 | // ── Decode + write bytes (binary-safe for base64) ────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 836 | // ── Resolve agent identity for the commit author ─────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 882 | // ── Notify UI so the memory view auto-refreshes ──────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 927 | // ── Delete a file from MemFS (durable agent memory delete + commit) ────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 959 | // ── Validate relative path ───────────────────────────────────── | COMMENT |
| MEDIUM | src/websocket/listener/commands/memory.ts | 981 | // ── Ensure MemFS is enabled and checked out ─────────────────── | COMMENT |
| 249 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .skills/adding-models/SKILL.md | 19 | ### Step 1: Find Valid Model Handles | COMMENT |
| LOW | .skills/adding-models/SKILL.md | 39 | ### Step 2: Add to models.json | COMMENT |
| LOW | .skills/adding-models/SKILL.md | 72 | ### Step 3: Test the Model | COMMENT |
| LOW | .skills/adding-models/SKILL.md | 85 | ### Step 4: Add to CI Test Matrix (Optional) | COMMENT |
| LOW⚡ | src/integration-tests/lazy-approval-recovery.test.ts | 189 | // Step 1: Wait for init, then send bash trigger prompt | COMMENT |
| LOW⚡ | src/integration-tests/lazy-approval-recovery.test.ts | 196 | // Step 2: A tool_call_message signals a tool was invoked. Approval-flow | COMMENT |
| LOW | src/agent/resolve-startup-agent.ts | 83 | // Step 1: Resume the last agent used in this project. Project continuity | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 94 | // Step 2: Pinned agent | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 102 | // Step 3: Multiple existing pins should ask instead of picking implicitly. | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 108 | // Step 4: Global LRU (directory-switching fallback) | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 127 | // Step 5: Custom API model picker | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 132 | // Step 6: Show selector if any pinned agents exist | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 137 | // Step 7: True fresh user — create default agent | COMMENT |
| LOW | src/agent/subagents/builtin/memory.md | 94 | ### Step 1: Inventory | COMMENT |
| LOW | src/agent/subagents/builtin/memory.md | 111 | ### Step 2: Identify system-managed files (skip) | COMMENT |
| LOW | src/agent/subagents/builtin/memory.md | 118 | ### Step 3: Defragment file-by-file | COMMENT |
| LOW | src/agent/subagents/builtin/memory.md | 154 | ### Step 4: Produce a detailed report | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 214 | ### Step 1: Understanding the Skill with Concrete Examples | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 231 | ### Step 2: Planning the Reusable Skill Contents | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 255 | ### Step 3: Initializing the Skill | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 279 | ### Step 4: Edit the Skill | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 334 | ### Step 5: Packaging a Skill | COMMENT |
| LOW | src/skills/builtin/creating-skills/SKILL.md | 361 | ### Step 6: Iterate | COMMENT |
| LOW | src/skills/builtin/context-doctor/SKILL.md | 19 | ### Step 1: Identify and resolve context issues | COMMENT |
| LOW | src/skills/builtin/context-doctor/SKILL.md | 99 | ### Step 2: Implement context fixes | COMMENT |
| LOW | src/skills/builtin/context-doctor/SKILL.md | 112 | ### Step 3: Commit and push | COMMENT |
| LOW | src/skills/builtin/context-doctor/SKILL.md | 127 | ### Step 4: Final checklist and message | COMMENT |
| LOW | src/skills/builtin/migrating-memory/SKILL.md | 64 | ### Step 1: Identify Source Agent | COMMENT |
| LOW | src/skills/builtin/converting-mcps-to-skills/SKILL.md | 18 | ### Step 1: Determine the transport type | COMMENT |
| LOW | src/skills/builtin/converting-mcps-to-skills/SKILL.md | 24 | ### Step 2: Test the connection | COMMENT |
| LOW | src/skills/builtin/converting-mcps-to-skills/SKILL.md | 44 | ### Step 3: Explore available tools | COMMENT |
| LOW⚡ | src/channels/telegram/setup.ts | 34 | // Step 1: Get token | COMMENT |
| LOW⚡ | src/channels/telegram/setup.ts | 41 | // Step 2: Validate token | COMMENT |
| LOW | src/channels/telegram/setup.ts | 55 | // Step 3: Choose DM policy | COMMENT |
| LOW | src/channels/telegram/setup.ts | 80 | // Step 4: Allowlist if needed | COMMENT |
| LOW | src/channels/telegram/setup.ts | 114 | // Step 5: Write account | COMMENT |
| LOW⚡ | src/channels/whatsapp/reactions-adapter.test.ts | 744 | // Step 1: send outbound text — populates sentMessageIds + messageStore. | COMMENT |
| LOW⚡ | src/channels/whatsapp/reactions-adapter.test.ts | 752 | // Step 2: emit outbound upsert echo — sentMessageIds entry consumed, | COMMENT |
| LOW | src/channels/whatsapp/reactions-adapter.test.ts | 766 | // Step 3: emit real-shape LID reaction with target.fromMe: false. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/integration-tests/lazy-approval-recovery.test.ts | 189 | // Step 1: Wait for init, then send bash trigger prompt | COMMENT |
| LOW⚡ | src/integration-tests/lazy-approval-recovery.test.ts | 196 | // Step 2: A tool_call_message signals a tool was invoked. Approval-flow | COMMENT |
| LOW | src/agent/resolve-startup-agent.ts | 83 | // Step 1: Resume the last agent used in this project. Project continuity | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 94 | // Step 2: Pinned agent | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 102 | // Step 3: Multiple existing pins should ask instead of picking implicitly. | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 108 | // Step 4: Global LRU (directory-switching fallback) | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 127 | // Step 5: Custom API model picker | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 132 | // Step 6: Show selector if any pinned agents exist | COMMENT |
| LOW⚡ | src/agent/resolve-startup-agent.ts | 137 | // Step 7: True fresh user — create default agent | COMMENT |
| LOW⚡ | src/channels/telegram/setup.ts | 34 | // Step 1: Get token | COMMENT |
| LOW⚡ | src/channels/telegram/setup.ts | 41 | // Step 2: Validate token | COMMENT |
| LOW | src/channels/telegram/setup.ts | 55 | // Step 3: Choose DM policy | COMMENT |
| LOW | src/channels/telegram/setup.ts | 80 | // Step 4: Allowlist if needed | COMMENT |
| LOW | src/channels/telegram/setup.ts | 114 | // Step 5: Write account | COMMENT |
| LOW⚡ | src/channels/whatsapp/reactions-adapter.test.ts | 744 | // Step 1: send outbound text — populates sentMessageIds + messageStore. | COMMENT |
| LOW⚡ | src/channels/whatsapp/reactions-adapter.test.ts | 752 | // Step 2: emit outbound upsert echo — sentMessageIds entry consumed, | COMMENT |
| LOW | src/channels/whatsapp/reactions-adapter.test.ts | 766 | // Step 3: emit real-shape LID reaction with target.fromMe: false. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | src/web/memory-viewer-template.txt | 964 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?def | CODE |
| CRITICAL | src/channels/slack/adapter-test-harness.ts | 381 | instance.client.assistant.threads.setStatus.mockClear(); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/postinstall-patches.js | 27 | // Resolve root of installed ink package; add robust fallbacks for Bun | COMMENT |
| MEDIUM | src/index.ts | 1080 | // Definitely a registry handle | COMMENT |
| MEDIUM | src/headless.ts | 1290 | // Definitely a registry handle | COMMENT |
| MEDIUM | src/websocket/listener/protocol-outbound.ts | 691 | // optimistic echo so the follow-up stays seamless (matches TUI, where the | COMMENT |
| MEDIUM | src/agent/memory-git.ts | 759 | // Primary config: normalized origin key (most robust for git's credential lookup) | COMMENT |
| MEDIUM | src/agent/memory-git-hooks.ts | 201 | # Reflection and other harness worktrees commit on temporary branches; only the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/agent/memory-worktree.test.ts | 26 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-worktree.test.ts | 28 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.signing.test.ts | 73 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.signing.test.ts | 75 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.ts | 745 | // Use a normalized path and escape whitespace for profiles like "Jane Doe". | COMMENT |
| LOW | src/agent/memory-git.postcommit.test.ts | 38 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.postcommit.test.ts | 40 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.precommit.test.ts | 22 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/agent/memory-git.precommit.test.ts | 24 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/reflection-worktree-completion.test.ts | 28 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/reflection-worktree-completion.test.ts | 30 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/subcommands/dream-targets.test.ts | 66 | expect(out).toContain("placeholder"); | CODE |
| LOW | src/cli/helpers/reflection-launcher.test.ts | 53 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/helpers/reflection-launcher.test.ts | 55 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/helpers/reflection-arena.test.ts | 20 | GIT_AUTHOR_EMAIL: "test@test.com", | CODE |
| LOW | src/cli/helpers/reflection-arena.test.ts | 22 | GIT_COMMITTER_EMAIL: "test@test.com", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/settings-manager.ts | 121 | // Shape of the `worktree` block in `.letta/settings.json`. The worktree tool | COMMENT |
| LOW | src/websocket/listen-client-concurrency.test.ts | 221 | const realAgentMessageModule = await import("@/agent/message"); | COMMENT |
| LOW | src/websocket/listener/constants.ts | 1 | export const MAX_RETRY_DURATION_MS = 5 * 60 * 1000; // 5 minutes | COMMENT |
| LOW | src/backend/local/local-context-estimate.ts | 1 | import type { Usage } from "@earendil-works/pi-ai"; | COMMENT |
| LOW | src/backend/api/mcp-servers.ts | 1 | // Server-side MCP servers are registered on the Letta server (via the ADE or | COMMENT |
| LOW | src/backend/dev/pi-image-elision.ts | 1 | import type { LocalMessage } from "@/backend/local/local-message"; | COMMENT |
| LOW | src/agent/memory-filesystem.test.ts | 681 | }; | COMMENT |
| LOW | src/agent/memory-filesystem.test.ts | 721 | // systemBlocks/systemFiles/detachedBlocks/detachedFiles | COMMENT |
| LOW | src/agent/memory-filesystem.test.ts | 741 | }; | COMMENT |
| LOW | src/cli/hooks/use-token-smoothing.ts | 1 | // React hook that returns a smoothed version of a monotonic count. | COMMENT |
| LOW | src/cli/helpers/stream.ts | 381 | "stream_drain", | COMMENT |
| LOW | src/permissions/cross-agent-guard.ts | 1 | // src/permissions/cross-agent-guard.ts | COMMENT |
| LOW | src/sandbox/bwrap.ts | 41 | // Root view: read-only for write-scoped profiles, writable for cross-agent. | COMMENT |
| LOW | src/sandbox/bwrap.ts | 61 | // masks, and bwrap is last-mount-wins for overlapping paths. A carve-out must | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/tools/impl/task.ts | 54 | max_turns?: number; // Maximum number of agentic turns | CODE |
| MEDIUM | src/permissions/checker.ts | 851 | // own path/read_only guardrails, so allow by default. | COMMENT |
| MEDIUM | …in/self-configuration/references/api-patch-examples.md | 16 | # Agent context window | COMMENT |
| MEDIUM | …in/self-configuration/references/api-patch-examples.md | 22 | # Conversation context window | COMMENT |
| MEDIUM | src/channels/protocol-account-commands.ts | 165 | // scaffold per-app plugin folders/channel IDs here. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | hooks/memory_logger.py | 428 | print(f"Error reading block: {e}") | CODE |
| MEDIUM | hooks/memory_logger.py | 489 | print(f"Error reading block: {e}") | CODE |
| LOW⚡ | hooks/memory_logger.py | 147 | except Exception: | CODE |
| LOW⚡ | hooks/memory_logger.py | 154 | except Exception as e: | CODE |
| LOW | …s/builtin/self-configuration/scripts/add_permission.py | 74 | except Exception: | CODE |
| LOW | …s/builtin/self-configuration/scripts/add_permission.py | 122 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks/typecheck-on-changes.sh | 5 | # Check if there are any uncommitted changes (staged or unstaged) | COMMENT |
| LOW | hooks/fix-on-changes.sh | 5 | # Check if there are any uncommitted changes (staged or unstaged) | COMMENT |
| LOW | src/agent/memory-git-hooks.ts | 110 | # Check if agent is trying to modify a protected key | COMMENT |
| LOW | src/agent/memory-git-hooks.ts | 145 | # Check if protected keys were removed (existed in HEAD but not in staged) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks/memory_logger.py | 184 | CODE | |
| LOW | hooks/memory_logger.py | 297 | CODE | |
| LOW | hooks/memory_logger.py | 476 | CODE | |
| LOW | hooks/memory_logger.py | 588 | CODE | |
| LOW | hooks/memory_logger.py | 520 | CODE | |
| LOW | …ills/builtin/self-configuration/scripts/show_config.py | 170 | CODE | |
| LOW | …ills/builtin/self-configuration/scripts/show_config.py | 259 | CODE | |
| LOW | …s/builtin/self-configuration/scripts/add_permission.py | 106 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/channels/core-stream.ts | 185 | async function processData(data: string): Promise<void> { | CODE |