II.
Page JSON
Structured · livepage:docs-agent-layer-gaps
Agent Layer Gaps — Full Agent Stack json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:docs-agent-layer-gaps",
"_kind": "Page",
"_file": "wiki/docs/agent-layer-gaps.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"sourcePath": "docs/agent-layer-gaps.md",
"sourceKind": "repo-docs",
"title": "Agent Layer Gaps — Full Agent Stack",
"displayName": "Agent Layer Gaps — Full Agent Stack",
"slug": "docs/agent-layer-gaps",
"articlePath": "wiki/docs/agent-layer-gaps.md",
"article": "\n# Agent Layer Gaps — Full Agent Stack\n\nComprehensive inventory of missing capabilities, stub implementations, and architectural weaknesses across agent-core (L4), agent-runtime (L5), agent-platform (L6), tasks-adapter, tools-adapter, transport-adapter, and babysitter-sdk.\n\n---\n\n## agent-core (L4) — 47 gaps\n\n### Critical (blocks production use)\n\n| Gap | File | Description |\n|-----|------|-------------|\n| No streaming | `session.ts:200-257` | `prompt()` waits for full response, emits single `text_delta` with everything. No token-by-token streaming. |\n| No multi-turn history | `session.ts:217-223` | Messages rebuilt from scratch each call. No persistent conversation context across `prompt()` calls. |\n| Structured output follow-up work | `session.ts`, `types.ts` | Agent-core now exposes opt-in `json_object`/`json_schema` prompt output, provider request mapping, local parsing, and focused schema validation. Remaining gaps: full JSON Schema validator coverage and streaming structured-output integration (#575). |\n| Token usage discarded | `session.ts:163-177` | Parsed from API response but never returned to caller or tracked cumulatively. |\n\n### High (major feature gaps)\n\n| Gap | File | Description |\n|-----|------|-------------|\n| Vision/multimodal follow-up work | `session.ts` | Agent-core now accepts direct prompt text/image URL/base64 content parts and maps them for OpenAI/Azure/Anthropic. Remaining gaps: streaming multimodal responses (#575), image-bearing `ToolResult` support (#588), and broader vision tool ergonomics. |\n| No tool AbortSignal | `types.ts:86-96` | Custom tools can't be cancelled by framework. Each must own its timeout. |\n| Token estimation remains heuristic | `context/token-estimator.ts` | Estimation is now provider/model-aware for OpenAI/Azure, Anthropic/Claude, and conservative unknown-model defaults, but still does not use exact provider tokenizer libraries or cost tracking. |\n| `initialize()` is no-op | `session.ts:196-198` | No connection warmup, no schema cache, no health check. |\n| No DI for LLM client | `session.ts:40-97` | Endpoint resolution hardcoded. Cannot inject custom fetch for testing/mocking. |\n| Browser tool fragile | `agenticTools/browser/tool.ts` | Global singleton, no connection pool, no resource limits, screenshot returns metadata not images. |\n| Web search hardcoded | `agenticTools/web/tools.ts:47-54` | DuckDuckGo HTML scraping only. No pluggable backend. Fragile to DOM changes. |\n| No error types | `agenticTools/shared/results.ts` | All errors → text strings. No `ToolNotFoundError`, `TimeoutError`, etc. |\n| Context summary is concatenation | `context/strategies/summary.ts:18-39` | No actual summarization. Evicted entries just joined with newlines. |\n\n### Medium (architectural weaknesses)\n\n| Gap | Description |\n|-----|-------------|\n| Concurrent strategy naive | `Promise.allSettled` with no per-agent timeout, no partial results, no graceful degradation |\n| Group-chat moderator fragile | String matching for agent selection, no validation against agent list |\n| Handoff has no state passing | Second agent doesn't know what first agent did. No context transfer. |\n| No loop cancellation token | `run()` generator can't be externally cancelled |\n| Oversight is single-pass | `maxRetries = 0` hardcoded. Reviewer can reject but no retry mechanism. |\n| Delegation timeout ignored | `timeout` parameter accepted but never enforced |\n| No plugin/extension API | DeferredToolRegistry exists but minimally integrated |\n| No caching anywhere | Tool results, web fetches, schema fetches — nothing cached |\n| Hardcoded limits | 50MB output, 120s bash, 30s search — not configurable |\n| 7 test files for 59 sources | Agentic tools, error paths, loop strategies untested |\n| Endpoint resolution duplicates adapters | Provider handling reimplemented instead of shared |\n\n---\n\n## agent-runtime (L5) — 48 gaps\n\n### Critical\n\n| Gap | File | Description |\n|-----|------|-------------|\n| K8s executor is stub | `execution/modes/kubernetes.ts:52-94` | Manifest builder only. No `kubectl apply`, no log streaming, no completion polling. Marks \"running\" without executing. |\n| No crash recovery | `daemon/lifecycle.ts:78-148` | Daemon death loses all pending work. No auto-restart, no watchdog. |\n| Crash recovery is partial | `daemon/lifecycle.ts`, `daemon/durableQueue.ts` | Trigger events can persist and replay through `DurableTriggerQueue`, but daemon death still has no auto-restart supervisor/watchdog flow. |\n| Resource budgets not enforced | `resources/manager.ts` | Limits checked but not blocking. Agents can exceed budgets. |\n| Telemetry has no export | `telemetry/provider.ts` | InMemoryTelemetryProvider only. Traces lost on process exit. No OTLP, no file export. |\n\n### High\n\n| Gap | File | Description |\n|-----|------|-------------|\n| Process isolation is partial | `execution/modes/local.ts`, `execution/policy.ts` | ExecutionPolicy now removes default parent env inheritance and fails fast for unsupported local network/kernel sandbox guarantees. Local mode is still a host process and does not provide namespaces, chroot, seccomp, or capability isolation. |\n| No graceful drain | `daemon/lifecycle.ts:152-226` | SIGTERM + grace period, but no coordinated queue drain. Active runs waited but no cancellation signal. |\n| No hot reload | `daemon/lifecycle.ts` | Config changes require full restart. Queue/active runs lost. |\n| SSH — partial verification | `execution/modes/ssh.ts` | Strict host-key checking is now the default and `StrictHostKeyChecking=no` requires an explicit insecure policy opt-in. Retry, pooling, and keepalive are still missing. |\n| Docker — partial sandbox policy | `execution/modes/docker.ts` | Docker args now include secure defaults plus resource/network/DNS policy support. Live daemon availability and image verification preflight remain missing. |\n| External trigger sources are incomplete | `daemon/types.ts`, `daemon/loop.ts` | File/webhook/timer are hardened with durable retry/DLQ, dedupe windows, queue depth admission, and webhook rate limiting. Broker/chat/git trigger adapters are still missing. |\n| Background process isolation/backpressure is partial | `backgroundProcessRegistry.ts` | Background execution now uses ExecutionPolicy env/cwd handling, retained/dropped stream byte metadata, optional process-group termination with grace escalation, timeout status, pause/resume capability checks, dependency queueing, and lifecycle hook diagnostics. Remaining gaps are OS-enforced isolation and daemon-level graceful drain/crash recovery. |\n\n### Medium\n\n| Gap | Description |\n|-----|-------------|\n| No CPU/memory/disk tracking | Only token/cost budgets. No system resource quotas. |\n| No admission control | No pre-flight budget check before effect dispatch. |\n| Cron advanced syntax is partial | Named days/months, timezone evaluation, standard macros, and `@reboot` are supported. `L` and `#N` calendar syntax remain unsupported. |\n| No event-driven triggers | File/webhook/timer only. No message queue (RabbitMQ/Kafka/SQS). |\n| Trigger rate limiting is local only | Webhook/loop admission supports local rate limits, dedupe windows, and queue caps. Distributed/adaptive throttling is still missing. |\n| No structured logging | Append-only JSON log. No levels, no filtering, no rotation. |\n| Health checks — no percentiles | Average latency only. No P50/P95/P99. |\n| No metrics export | Snapshots computed but never sent to monitoring (Prometheus, CloudWatch). |\n| No systemd/supervisor integration | Manual start/stop. No restart on reboot. |\n| No distributed tracing | No W3C trace context, no OTLP spans. |\n| No config migration | No version field. Schema changes break existing daemons. |\n| Limited test coverage | No daemon loop integration tests, no crash recovery tests. |\n\n---\n\n## agent-platform (L6) — 40+ gaps\n\n### Critical (blocks platform viability)\n\n| Gap | File | Description |\n|-----|------|-------------|\n| MCP not integrated | `src/mcp/client/*` | Full MCP client, transport, executor implemented but NOT wired into orchestration. Tool routing disconnected. |\n| ConcurrentEffects not implemented | `src/harness/types.ts:30` | Capability declared but effects processed sequentially. No Promise.all batching. |\n| Breakpoints not integrated | `src/breakpoints/*` | Approval chains, delegation, postures defined but never invoked during orchestration. |\n| Cost tracking not integrated | `src/cost/effectCost.ts` | Per-effect cost aggregation exists but not called during effect resolution. |\n| Session budget enforcement partial | `src/session/cost.ts`, `src/harness/internal/createRun/orchestration/effects.ts` | Post-effect overlays now update session cost, mark thresholds, and set explicit auto-pause budgets paused; broader pre-dispatch admission control remains missing. |\n\n### High\n\n| Gap | File | Description |\n|-----|------|-------------|\n| BackgroundEffects not implemented | `src/harness/types.ts:32` | Declared but no non-blocking effect dispatch. Orchestration blocks on every effect. |\n| MultiHarnessDispatch not implemented | `src/harness/types.ts:34` | No support for distributing effects across multiple harnesses. |\n| Session history partially wired | `src/session/history.ts`, `src/harness/internal/createRun/orchestration/effects.ts` | Post-effect decisions/context snapshots and external run summaries are captured; broader internal-orchestration summary coverage remains to be expanded. |\n| Session compaction partially triggered | `src/compression/compaction.ts`, `src/harness/internal/createRun/orchestration/effects.ts` | Post-effect overlays invoke compaction from estimated state size thresholds while preserving source journals/tasks. |\n| Capability router partially wired | `src/harness/capabilityRouter.ts`, `src/harness/internal/createRun/utils.ts` | Explicit task execution/policy hints can route through capability scoring; default dispatch remains compatibility-preserving. |\n| Model selection partially wired | `src/harness/modelSelection.ts`, `src/harness/internal/createRun/utils.ts` | Explicit `execution.model` hints can use model-aware harness selection; default routing is unchanged. |\n| Fallback chains partially wired | `src/harness/fallbackChains.ts`, `src/harness/internal/createRun/utils.ts` | Explicit fallback-chain metadata can select the next installed harness; runtime retry policy still needs broader integration. |\n| Sandbox policy not enforced | `src/governance/sandboxPolicy.ts` | Rules defined but not enforced on tool execution. |\n| MCP channels disconnected | `src/mcp/channels/*` | Allowlist, inbound queue, outbound sender exist but not connected to interaction routing. |\n| Streaming output not implemented | `src/harness/types.ts:93-100` | Type defined but no streaming callbacks in effect resolution. |\n\n### Medium\n\n| Gap | Description |\n|-----|-------------|\n| Conditional task routing partially integrated | Process JavaScript can branch on `ctx.task` results; remaining work is making declarative task dependencies and route metadata first-class. |\n| Checkpointing partially integrated | SDK effect-group checkpoint metadata exists; process-level savepoint/replay contracts still need a durable public API. |\n| No rollback/undo | Reversible effects and compensating actions still need an explicit non-rollbackable vs rollbackable contract. |\n| Nested orchestration partially integrated | `subprocess` effects create child runs; child pending actions now use the same grouped dispatch path as top-level orchestration. |\n| No process versioning | Breaking changes in process definitions unmanaged. |\n| No multi-agent orchestration | No agent pools, discovery, or load balancing. |\n| No tool discovery/registry population | `deferredToolRegistry.ts` exists but not populated. |\n| No rate limiting per harness | No token bucket or sliding window. |\n| No process dependency management | Tasks within a process can't declare dependencies. |\n| Orchestration dispatch partially concurrent | Agent-platform groups same-iteration actions by `schedulerHints.parallelGroupId`, honors `maxConcurrency`/`executionStrategy`, preserves deterministic commit order, and routes per-action harness hints; broader agent-pool scheduling remains missing. |\n| Session context plan-phase coverage partial | Bounded session context is injected into planProcess prompts when a current harness session context is resolvable; sessions without resolvable context keep the old prompt shape. |\n| Daemon max concurrent runs defaults to 4 | Configurable via daemon config; the default may still need workload-specific tuning. |\n| Selection policies partially wired | `src/harness/selectionPolicies.ts` can be invoked by explicit task metadata/execution policy hints; default dispatch remains unchanged. |\n\n---\n\n## tasks-adapter (Human-in-the-Loop & Task System) — 51 gaps\n\n### Critical (blocks agent stack integration)\n\n| Gap | File | Description |\n|-----|------|-------------|\n| Not wired into agent stack | `agent-core/tools/delegation.ts:86-98` | `task` tool uses generic `taskHandler` callback, NOT tasks-adapter. Breakpoints, responders, routing all disconnected from agent execution. |\n| MCP tools not auto-discovered | `agent-platform/mcp/client/toolRegistry.ts` | Marked \"NOT INTEGRATED YET\". tasks-adapter MCP server has 8 tools but agent harness doesn't know they exist. |\n| Breakpoint delegation disconnected | `agent-platform/breakpoints/delegation.ts:1-8` | Marked \"NOT INTEGRATED YET\". Webhook routing exists but not connected to tasks-adapter backends. |\n| Native agent-core tools wrapping tasks-adapter are partial | — | tasks-adapter now exposes MCP tools such as `create_todo`, `assign_task`, `search_tasks`, `add_comment`, `bulk_update_tasks`, `task_stats`, `export_tasks`, and `escalate`; direct agent-core tool wrapping and auto-discovery remain separate integration work. |\n| Approval chains not integrated | `agent-platform/breakpoints/approvalChains.ts` | Sequential/quorum approvals defined but never invoked during orchestration. |\n\n### High (major task management gaps)\n\n| Gap | Description |\n|-----|-------------|\n| Task priorities are partially implemented | Breakpoint schema now has `priority` (`low`, `medium`, `high`, `critical`) and git-native search can filter/sort by priority. Routing policy integration remains follow-up work. |\n| Task dependencies are partially implemented | Breakpoint schema now has `dependsOn[]`; dependency-aware routing/blocking policy remains follow-up work. |\n| Search/filter API is partially implemented | Git-native now exposes `searchBreakpoints(query)` with text/status/priority/assignee/responder/tag/domain/date filters, sorting, and pagination. External backend parity remains capability-gated. |\n| Bulk operations are partially implemented | Git-native now supports bulk cancel/close/reassign/transition/approve with per-item results. External backend parity remains capability-gated. |\n| No subagent spawning via task system | Agent-to-agent delegation doesn't route through responder discovery/matching. |\n| No escalation chains | No fallback responders when initial responder times out. |\n| MCP tools are partially implemented | tasks-adapter exposes native task tools including `create_todo`, `assign_task`, `search_tasks`, `add_comment`, `bulk_update_tasks`, `task_stats`, `export_tasks`, and `escalate`; cancellation remains covered by breakpoint APIs rather than a dedicated native-task alias. |\n| Interactive forms are schema-only | Breakpoint schema includes form definitions/submissions, but no full conditional form UX or file review flow exists yet. |\n\n### Medium\n\n| Gap | Description |\n|-----|-------------|\n| Task states are partially implemented | Breakpoint status now includes `assigned`, `in-progress`, `blocked`, and `escalated`; broader routing semantics remain follow-up work. |\n| Status history/timeline is partially implemented | Git-native appends history entries for create/assign/status/comment/answer operations. Cross-backend parity remains capability-gated. |\n| Notifications are schema-only | Notification provider config exists and is disabled by default; real email, Slack, Discord, and webhook dispatch remains follow-up work. |\n| Task metrics/SLA are partially implemented | Git-native computes deterministic status/priority counts and response/completion timing where available; responder performance analytics remain follow-up work. |\n| Discussion threads are partially implemented | Git-native supports comments on breakpoints and MCP exposes `add_comment`; richer threaded UX remains follow-up work. |\n| No offline queue | Server backend has no local fallback if server is down. |\n| State machine validation is partially implemented | Shared transition validation rejects invalid terminal-state changes and git-native uses it for lifecycle transitions. |\n| Audit log is partially implemented | Git-native appends audit entries for core task-management mutations. Cross-backend audit parity remains follow-up work. |\n| CLI commands are partially implemented | `tasks-adapter tasks search|assign|close|comment|stats|export` cover local git-native task-management operations. Dedicated approve/templates/rules commands remain follow-up work. |\n| Only 3 backends | git-native, server, github-issues. Missing: database, S3, Slack, Linear/Jira. |\n| No schema migration | Can't upgrade breakpoint format across versions. |\n| Responder matching not integrated | `responder-matcher.ts` exists but only used in CLI, not in agent routing decisions. |\n\n---\n\n## tools-adapter (Unified Tool Dispatch) — NOT INTEGRATED\n\ntools-adapter provides ToolRegistry, ToolDispatcher (policy-driven routing), McpBridge, and schema translation for all providers (Anthropic, OpenAI, Google, Bedrock). None of it is wired into the agent stack.\n\n### Critical\n\n| Gap | Description |\n|-----|-------------|\n| Not used by agent-core | agent-core has DeferredToolRegistry (custom two-tier registry). tools-adapter's ToolDispatcher would provide unified dispatch policy across builtin, MCP, and plugin tools. |\n| Not used by agent-platform | agent-platform has McpToolRegistry + McpToolExecutor (separate from tools-adapter). No unified tool dispatch mechanism. |\n| 3 registries, no unification | DeferredToolRegistry (L4) + McpToolRegistry (L6) + ToolRegistry (tools-adapter). Should be one system. |\n| Hook bridge is no-op | `ToolHookBridge` is `NoopToolHookBridge`. PreToolUse/PostToolUse hooks never fire. No hooks-adapter integration. |\n| McpBridge is declarative-only | Registers MCP tool definitions but no runtime server lifecycle management. |\n| No dynamic routing | Policy rules are static. No context-aware routing (by runId, sessionId, caller, cost). |\n| No plugin tool type | DeferredToolRegistry handles plugins but tools-adapter doesn't. |\n\n### Where it should plug in\n\n```\nagent-core tool_search/tool_fetch → tools-adapter ToolRegistry (replaces DeferredToolRegistry)\nagent-core code_executor → tools-adapter ToolDispatcher.dispatch() (policy routing)\nagent-platform MCP tools → tools-adapter McpBridge (unified registration)\nhooks-adapter PreToolUse/PostToolUse → tools-adapter ToolHookBridge (permission/audit)\n```\n\n---\n\n## transport-adapter (Protocol Translation) — PARTIALLY INTEGRATED\n\ntransport-adapter provides protocol translation (Anthropic↔OpenAI↔Google↔Bedrock↔Azure↔Vertex), codec system, completion engines with streaming, and an HTTP proxy runtime. Used by adapters launcher but disconnected from the rest of the agent stack.\n\n### Gaps\n\n| Gap | Description |\n|-----|-------------|\n| Cost feedback missing | Proxy extracts cost records per-request but never feeds them to SDK journal or L6 cost tracking. |\n| Session-unaware | Proxy is stateless. No runId/sessionId tracking. Can't trace requests through distributed orchestration. |\n| Codec discovery not pluggable | New providers require hardcoded codec registration. No plugin system. |\n| Not integrated with L6 | agent-platform reads some codec metadata but doesn't feed tool definitions back to codecs. |\n| \"Provisional\" cutover | Marked provisional in agent-catalog pending scorecard:migration gate. |\n\n### Where it should plug in\n\n```\nadapters launcher → transport-adapter proxy (DONE — this works)\ntransport-adapter cost records → SDK journal appendEvent (MISSING — cost feedback loop)\ntransport-adapter request traces → L5 telemetry spans (MISSING — distributed tracing)\ntransport-adapter tool normalization → tools-adapter schema translation (MISSING — should share)\n```\n\n---\n\n## babysitter-sdk (Foundation) — PARTIALLY LEVERAGED\n\nSDK provides the effect journal, replay engine, task system (defineTask/ctx.task), runtime lifecycle, state cache, MCP server, and CLI. It's the foundation that L5/L6 build on, but several SDK features are unused.\n\n### Gaps\n\n| Gap | Description |\n|-----|-------------|\n| SDK MCP server orphaned | `createBabysitterMcpServer()` exposes task/run/session tools but never registered in tools-adapter McpBridge or L6 MCP client. |\n| SDK tasks ≠ tasks-adapter | SDK has `defineTask()` / `ctx.task()`. tasks-adapter has `BreakpointBackend`. Two separate task systems that don't know about each other. |\n| No subagent effect type | Journal tracks effects but has no entry type for cross-agent dispatch. adapters launches happen outside the journal. |\n| Effect execution scattered | SDK journals effects but actual execution is hardcoded per-type across agent-platform (file, code, web) and adapters (harness launch). No unified effect executor. |\n| No tool metadata in tasks | SDK tasks have descriptions but no JSON Schema parameters. agent-core's tool_fetch needs schemas for discovery. |\n| Hooks disconnected | SDK has hooks/runtime.ts but no connection to hooks-adapter lifecycle events. |\n| Plugin registry parallel | SDK has plugin registry, agent-platform has separate plugin system. |\n\n### Where it should plug in\n\n```\nSDK MCP server → tools-adapter McpBridge → agent-core tool discovery (MISSING)\nSDK defineTask → tasks-adapter BreakpointBackend (MISSING — for human-in-the-loop tasks)\nSDK effect journal → subagent effect type → adapters adapter dispatch (MISSING)\nSDK hooks → hooks-adapter lifecycle events (MISSING)\nSDK effect execution → unified executor → tools-adapter dispatch (MISSING)\n```\n\n---\n\n## genty → Agent-Adapter Cross-Agent Dispatch (NOT IMPLEMENTED)\n\ngenty should be able to dispatch subtasks to external agents supported by adapters (claude-code, codex, gemini-cli, copilot, etc.) through the runtime. This enables an genty orchestration to delegate specialist work to the best available agent.\n\n### Missing Architecture\n\n```\nCurrent:\n genty → agent-core session (direct API) → single model, no tool agents\n\nNeeded:\n genty → agent-platform effect dispatch\n → SDK \"subagent\" effect type (journaled)\n → tasks-adapter routes to responder (adapters adapter)\n → adapters adapter launches target agent (claude-code, codex, etc.)\n → result posted back through tasks-adapter → SDK journal\n → orchestration continues with result\n```\n\n### Specific Gaps\n\n| Gap | Description |\n|-----|-------------|\n| No subagent effect type in SDK | Need `kind: \"subagent\"` with `{ targetAgent, prompt, model, timeout }` |\n| No adapters adapter selection in genty | genty doesn't know about adapters's adapter registry |\n| No tasks-adapter routing for subagent dispatch | tasks-adapter routes to human responders, not to adapters adapters |\n| No result collection from external agents | adapters launch returns stdout/stderr but no structured task result |\n| No cross-agent session context | Dispatched agent doesn't see parent's context, files, or journal |\n\n---\n\n## External Issue Tracker Integration (MISSING)\n\ntasks-adapter should support pluggable external issue tracker backends for subtask tracking, syncing breakpoints bidirectionally with the team's project management tools.\n\n### Current State\n\nOnly `GitHubIssuesBackend` exists. Basic mapping of breakpoints to GitHub issues.\n\n### Missing Backends\n\n| Backend | Priority | Description |\n|---------|----------|-------------|\n| Jira | High | REST API integration. Map breakpoints to Jira issues. Bidirectional sync. |\n| Linear | High | GraphQL API. Map to Linear issues. Automated status transitions. |\n| Generic REST | High | Configurable HTTP adapter for any REST-based tracker. |\n| Slack threads | Medium | Map breakpoints to Slack message threads for lightweight tracking. |\n| Trello | Low | Board/card mapping. |\n| Azure DevOps | Low | Work item integration. |\n\n### Missing Sync Capabilities\n\n| Gap | Description |\n|-----|-------------|\n| No bidirectional sync | GitHub Issues backend creates issues but doesn't sync status changes back. |\n| No conflict resolution | If issue is updated in both places, no merge strategy. |\n| No field mapping config | Fixed mapping. Can't customize which breakpoint fields map to which issue fields. |\n| No webhook listeners | Can't receive push notifications from external trackers on status change. |\n| No bulk sync | Can't sync all existing breakpoints to a tracker on first connect. |\n| No backend plugin system | Adding a backend requires code changes, not configuration. |\n\n---\n\n## Cross-Layer Integration Gaps\n\n| Gap | Layers | Description |\n|-----|--------|-------------|\n| ~~Background process registry duplicated~~ | ~~L4↔L5~~ | ~~Same code in 5 files across agent-core, agent-runtime, agent-platform~~ → runtime now owns the registry/state; core and platform keep shims |\n| ~~Shell invocation duplicated~~ | ~~L4↔L5↔L6~~ | ~~5 locations with different flags (now unified but still duplicated)~~ → runtime now owns the shell argv contract |\n| Endpoint resolution duplicated | L4↔adapters | agent-core reimplements provider handling that adapters owns |\n| Cost tracking disconnected | L4→L5→L6 | Token usage parsed in L4, budgets in L5, enforcement supposed in L6 — none connected |\n| Session state fragmented | L5↔L6 | Runtime has session types, platform has session management — not integrated |\n| Telemetry isolated | L5 | In-memory only, never exported to L6 or external systems |\n| Resource limits advisory | L5→L6 | Budgets exist in L5, capability routing in L6 — neither enforced at spawn time |\n| tasks-adapter isolated from agent stack | L4↔tasks-adapter | Agent tools (task, ask) don't route through tasks-adapter. Breakpoints, responder discovery, routing all disconnected. |\n| Breakpoint delegation disconnected | L6↔tasks-adapter | agent-platform breakpoint system and tasks-adapter backends are parallel implementations, not integrated |\n| MCP tools not registered | L6↔tasks-adapter | tasks-adapter MCP server has 8 tools but agent harness doesn't discover or register them |\n| Approval chains orphaned | L6↔tasks-adapter | Sequential/quorum approval logic in L6 is not wired to tasks-adapter routing/answering |\n| 3 separate tool registries | L4↔tools-adapter↔L6 | DeferredToolRegistry (L4) + McpToolRegistry (L6) + ToolRegistry (tools-adapter) — should be unified |\n| tools-adapter dispatch not used | tools-adapter↔L4 | ToolDispatcher exists with policy-driven routing but agent-core hardcodes tool execution |\n| tools-adapter hooks stubbed | tools-adapter↔hooks-adapter | ToolHookBridge is NoopToolHookBridge. PreToolUse/PostToolUse never fire. |\n| No subagent effect type | SDK↔adapters | SDK journal has no effect type for cross-agent dispatch. adapters launches happen outside journal. |\n| SDK MCP server disconnected | SDK↔tools-adapter↔L6 | SDK's `createBabysitterMcpServer()` never registered in tools-adapter McpBridge or L6 MCP client |\n| SDK tasks ≠ tasks-adapter | SDK↔tasks-adapter | SDK has its own task system (defineTask, ctx.task). tasks-adapter has BreakpointBackend. Neither knows about the other. |\n| transport-adapter cost feedback missing | transport-adapter↔SDK | Proxy extracts cost records but never feeds them back to SDK journal or L6 cost tracking |\n| transport-adapter session-unaware | transport-adapter↔L5 | Proxy is stateless. No runId/sessionId tracking for distributed observability. |\n| No cross-agent task dispatch | tasks-adapter↔adapters | genty can't dispatch subtasks to external agents (claude-code, codex, etc.) via adapters adapters |\n| No external issue tracker sync | tasks-adapter↔external | Only GitHub Issues backend. No Jira, Linear, or generic REST backend for pluggable subtask tracking. |\n\n---\n\n## Priority Fix Order\n\n**P0 — Unblock production agent use:**\n1. Streaming responses in agent-core session\n2. Multi-turn conversation history\n3. Unify tool registries: tools-adapter ToolDispatcher replaces DeferredToolRegistry + McpToolRegistry\n4. Wire tasks-adapter into agent stack (native tools: todo, task, ask, approve, assign)\n5. Wire MCP into agent-platform orchestration (connect tools-adapter McpBridge)\n6. Complete ConcurrentEffects coverage beyond grouped agent-platform dispatch\n7. Token usage tracking end-to-end (L4 → transport-adapter → SDK journal → L6 cost)\n\n**P1 — Unblock platform features:**\n1. Subagent effect type in SDK journal + genty → adapters adapter dispatch\n2. Structured output / JSON mode hardening in agent-core (full schema validator coverage and streaming coordination)\n3. Vision/multimodal input follow-through (#575 streaming responses, #588 image-bearing `ToolResult`)\n4. Wire breakpoint delegation → tasks-adapter backends\n5. Wire approval chains → tasks-adapter routing\n6. Cost budget enforcement in orchestration (transport-adapter cost feedback → SDK)\n7. Background effects (non-blocking dispatch)\n8. tasks-adapter search/filter API + priorities + dependencies\n\n**P2 — Integration & hardening:**\n1. External issue tracker backends (Jira, Linear, generic REST) with bidirectional sync\n2. genty cross-agent dispatch: tasks-adapter routes subtasks to adapters adapters\n3. K8s executor implementation\n4. Crash recovery + persistent queue in daemon\n5. Process isolation/sandboxing\n6. Distributed tracing (transport-adapter → L5 telemetry → OTLP export)\n7. Tool cancellation via AbortSignal\n8. tasks-adapter notifications, escalation chains, backend plugin system\n9. SDK hooks → hooks-adapter lifecycle wiring\n10. tools-adapter hook bridge → hooks-adapter PreToolUse/PostToolUse\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:docs",
"to": "page:docs-agent-layer-gaps",
"kind": "contains_page"
}
]
}