The previous post, A Late-Night Reflection: What Starting Up Taught Me, was about lessons from the startup, the customers, and the channels. This one comes back to engineering and the product itself: from building a system with pure vibe coding, to the architectural trade-offs and governance boundaries of an enterprise Agentic security platform. It is also a look at what I can still do in the AI era. // While writing the Q&A for this piece, I kept turning over another note, Technology and Value: How does technology create value? How does that value get commercialized? And how does capital earn a fair return from that commercialization?
A few names come up below, so here they are up front: X-Pulsar is the control plane and the product’s main entry, X2-Sea is the security data lake and the fact base, X2-Halo is the unified execution sandbox, X2-Orbit is the evaluation benchmark, and SuperNova is the penetration team built on the platform’s multi-agent mechanism.
Here is an earlier cut of the product introduction: https://x.com/iamixyz/status/2123641597636341877/video/1
How Is Vibe Coding Actually Useful?
Q1: If you rely exclusively on agents to write the code, how do you keep it stable and usable?
A: Stability depends on a few reinforcing layers: constraining product architecture, disciplining how coding agents are used, and enforcing an SDLC built for the vibe-coding era:
- Agentic SDLC and Assurance Engineering on the software side: At minimum, TDD, local
AGENTSrules linked back to platform standards, localclaude-mem, and remote GitHub state tracking. In the workflow itself, every change starts with a tracked GitHub issue, pull requests get audited by an independent review agent, and coding agents also run via Feishu IM. For details, see SDLC in the AI Agent Era: Reapplying Security Engineering and Agentic Assurance Engineering: Bringing AI Coding into Real-World Engineering. - Microservices on the architecture side: Microservices have a natural edge here. Each service does one job, stays small and concise, and is safer to reason about. Smaller boundaries make component splits, TDD verification, and formal checks far more practical.
- End-to-end verification across environments: Different checks run at different stages, from unit tests inside feature worktrees and full local pre-push git-hook suites, to integration tests in CI/CD, and automatic deployment to the integration environment where a QA agent re-runs UI tests, standalone scenario tests, and API contract checks. // As the codebase grows, running the entire unit test suite takes longer and longer. You can scope unit tests to the PR’s blast radius, for example skipping backend tests on pure frontend changes that touch no APIs, while staying alert to security issues that formal checks alone might miss.
Beyond those pillars, you need scaffolding and guardrails. Using Architecture as Code, we generated the architectural boundary for each product feature so any change crossing that schema fails CI/CD and stops agents from freelancing. We set up Code Owners so agent submissions automatically open PRs for independent review, plus a dedicated SDLC bot. A few ideas never made it to completion: deterministic tooling to improve coding-agent accuracy, AST-based dependency analysis instead of letting agents rely purely on grep, and richer local hooks around agent runs.
Q2: If every new model release uncovers fresh problems in existing code, how do you handle fixing them?
A: Every major audit round turns up at least 10 to 20 issues. Fix them, run the next round, and more show up. Some of those are not real bugs; they are intentional design choices that a model mislabels as defects. Still, across repeated audit rounds, newer models mostly stop finding brand-new classes of defects. Two patterns stand out:
- Turning audit findings into permanent guardrails: Issues found in periodic audits (architecture, design, functionality, performance, security) get extracted after the fix into platform standards, local
claude-mem, and local skills (so the next audit can check for them again) to keep the same problems from coming back. Smarter models do spot rough edges in older code, but those are mostly wiring cleanup, orphaned or dead code, plus syntax-level and business-logic review. Once output verification confirms there is no performance or security issue, syntax complaints can be relaxed, and the real fixes get forced back into coding standards and closed inside the Agentic SDLC loop. // This covers more than 90% of the problems. - Security bugs that the coding agent refuses to fix: In one real case, we had an SSRF vulnerability. We pointed the agent at the exact code block and told it to patch the SSRF, and it refused, treating the fix as a violation of its cyber principles (basically Claude Code being dense). Those failures are expensive, so the rules have to land in the development standards as early as possible: once to stop the model from refusing, and again so the audit does not miss them. Workarounds we actually used were downgrading to Opus 4.6 to patch that code, or fixing it on GPT-5.6 after a jailbreak prompt. // Same idea as security governance: the later you catch it, the more it costs. Shift left. Especially when an agent is writing the code, putting the guardrail up front is safer, faster, and cheaper. // This remaining 10% or so is hard to fix.
Q3: Where does the human step in?
A: During coding, human intervention stays mostly outside the code itself: reviewing proposals, merging PRs, judging UI taste, and designing product features. Once a design is written, a coding agent claims the GitHub issue under a user identity and leaves a comment so other humans or agents do not collide on it. Early on I created issues by hand; later, agents generated issues themselves during iteration. For some designs, a coding agent opens a Draft PR; a human promotes and merges it as the approved implementation plan, and the agent continues from the PR linked on the issue. Locally, it spins up an isolated worktree, implements the feature, runs verification, and pushes a PR (human-confirmed early on, automated later). Every milestone posts to an IM group, where a human can mention the SDLC bot to ask questions or open a new tracking item.
Human intervention inside the product itself is different and depends on default policy: confirming authorization scope, approving offensive actions, handling escalations after hitting a fault wall, and reviewing actions that fall outside policy rules.
Q4: What interesting operational problems came up during development?
A: Autonomous iteration produced massive session logs (a few single Claude Code sessions hit 3-5GB). Worktrees did not share dependency caches, so every fresh node_modules and Python venv ate huge amounts of disk space, and the growing pile of worktrees kept filling storage. CI/CD runs stretched longer as unit tests accumulated. On a multi-node k3s cluster hosting both the container registry and unit-test workloads, heavy test runs knocked the node over, causing deployments to hang pulling images and taking down the entire integration environment. We also hit HITL dead loops. // Plus an API relay provider that misbilled our usage.
Q5: What engineering standards did you enforce during development?
A: Listing a subset from the platform side:
For the platform itself:
- Config center over environment variables; platform feature flags over config center
- Execution authority comes from policy gates, never from model confidence
- Durable asynchronous jobs must run through managed queue semantics
- LLM outputs must pass into constrained intermediate representations
- Presentation layers must never disguise read failures as plausible values
For coding agents:
- Platform truth lives in contracts and status docs, not prompt memory
- Algorithms beat models for known solutions in fixed scenarios
- Degradation must be observable
- UI changes require an explicit scope
- Stability outranks feature expansion during implementation
- Schema changes belong to migration tools; every persistent store must declare a single schema authority
There are also standards for issue tracking, MCP server governance, the pre-release checklist, SDLC, secret management, vibe-coding collaboration, testing, Git versioning, and more. Answering this question made it obvious again: development rules that used to live in a wiki now live in the Git repo, where agents call them directly. Compared with asking humans to follow them, the way agents follow them is clearly better. The main set is now collected at https://github.com/OpenAgenticSecurity/agentic-sdlc/tree/main/standards.
How the Product Was Designed
Architecture Skeleton and Trade-Offs
Q6: What were the core design principles behind the platform?
A: Architecturally, the platform splits into four planes: the Cognitive Learning Plane (intelligence and advice), the Control Plane (agent teams plus sandboxes, HITL, SSO, and everything platform-owned), the Fact Plane (facts landing in the data lake), and the Execution Plane (MCP integrations and permission governance, where control stays with the platform and egress only executes authorized commands).
%%{init: {'theme':'base','themeVariables':{'fontFamily':'Arial, PingFang SC, Microsoft YaHei','primaryColor':'#E8F1FF','primaryTextColor':'#10233F','primaryBorderColor':'#3568A8','lineColor':'#55708F'}}}%% |
Figure 1: The four planes and their write-authority boundaries. The control plane owns execution authority, the fact plane stores replayable evidence, and the cognitive plane advises without mutating state directly.
- Separation of control and execution: Intelligence only advises. Execution requires an active policy and passes through explicit contract checks.
- Evidence-driven conclusions: Every conclusion must carry evidence, tiered verification, and replayability.
- Compounding data: Better data makes the model smarter; grounded data gives the model more trustworthy outputs. Agents act on facts, read back the outcome to update decisions, and close the loop.
- Closed loops: Code -> runtime instance -> SOC as the primary loop, alongside runtime-to-code root cause, incident-to-forensics, bidirectional attack and probe coverage, attack-to-detection-to-new-rule, and continuous adversarial play between a mirror range and offensive agents.
- Single write authority and hot/cold separation: Each plane keeps its own books and never crosses lanes to mutate another plane’s state. The analytics lake never enters the operational hot path, and memories produced by the cognitive plane remain low-trust advice by default until the control plane promotes them.
- Design for failure and honest degradation (Fail-Closed): When authorization checks fail, data sources go dark, or coverage is incomplete, block by default and expose the unknown honestly instead of fabricating plausible zeros.
Looking back, the four-plane model is clean as an end-state architecture, but it is a double-edged sword at an early startup. Splitting into four separate systems too early lets cross-repo contracts and wiring eat a huge share of engineering bandwidth. Lock in the principles early, but pace the split to real customer validation.
Q7: What product features changed along the way, and what key decisions did you reverse or adjust?
A: For a startup CTO, knowing what not to build matters more than knowing what to build:
- Froze non-core components: The model and MCP gateway, the shared contract library, Governed Mission Control wiring, and generic agent recommendation features.
- Pivoted from single Agent + MCP + Playbook learning to multi-agent teams: We broke standalone security engines into scenario packs inside the Agentic Security Platform. There was a very real cost bill behind that move: keeping standalone pentest and code-security engines behind MCP created heavy bilateral contract maintenance (signed caller context, principal-bound cancellation, terminal-failure projection, dual-sided HITL and authorization). Every governance change required coordinated cross-repo releases, and tens of thousands of lines of glue code dragged down the main line.
- Replaced the pentest sandbox MCP with a unified sandbox: Different scenarios now bind to tailored sandbox profiles as the agent’s default environment for running scripts and computation.
- Cut the heavy application-layer anti-hallucination components written to prop up weaker models (such as
FactVerifier,HonestyAgent, andDIRECTmode) and replaced them with deterministic evidence-reference checks. - Shifted the product shape from a chat-centric UI to Cases as the main line, plus a separate human work queue.
- Froze full multi-tenancy: Since we targeted B2B deployments, we used k3s Namespaces for tenant isolation and spun up a dedicated tenant namespace per POC customer.
Echoing the previous post: agents amplify building speed, and technical overconfidence quickly turns into waste. Building an MCP gateway early just to make agent actions controllable was premature. Another lesson: freezing is easy, retiring is hard. In the agent era, adding a feature takes half a day, but deleting old paths, compatibility toggles, and legacy code takes real discipline. Leave them behind and the platform drowns in half-dead feature flags.
Q8: How do you make an agent genuinely controllable?
A: Put governance on the actual execution path. The model proposes an action, the platform decides whether it is allowed, and the executor runs only actions that are already authorized. Authorization has to name who, against which resource, doing what, with which parameters, and inside what time and budget, and every action has to leave both a decision record and an execution record. Following the real component design, an MCP gateway or an LLM gateway for example, concrete contract parameters are threaded through so the whole chain, from the model request and the task call to credential retrieval, is recordable. There is a grant record: the later action proceeds only when the grant is satisfied, and it is not released when the grant is not.
%%{init: {'theme':'base','themeVariables':{'fontFamily':'Arial, PingFang SC, Microsoft YaHei','primaryColor':'#E8F1FF','primaryTextColor':'#10233F','primaryBorderColor':'#3568A8','lineColor':'#55708F'}}}%% |
Figure 2: The engineering control loop for controllable agents. Identity and credentials stay server-side, execution runs under hard budgets and an out-of-band kill switch, and results are confirmed via independent read-back.
In engineering practice, an upfront Grant alone is not enough. Control has to be one closed loop of pre-flight admission, mid-flight emergency stop, and post-flight verification. Before execution, the server hard-binds identity, tenant, and SecretRef credentials (never trusting model arguments), passes a fail-closed policy gate, the Grant, and a blast-radius cap, and rolls out via Shadow->Enforce. During execution, loop detection plus hard token and wall-clock caps sit alongside an out-of-band one-click stop that is independent of the LLM loop; once it is pulled, old Grants are void immediately. After execution, a tool returning success does not count, an unknown state on timeout must never be blindly retried, and an independent read-only query does the read-after-write check (defenses against Prompt Injection bypass are in Q20).
Outside governance, model intelligence and output reliability still matter enormously. Different models obey contract layers very differently: strong models follow structured conventions reliably, while weak models break them even inside a well-designed harness. Flip that around: any boundary you can lock down with deterministic code (schema validation, strict parameter constraints, explicit tool allowlists, fixed state machines) should never rely on asking the model nicely in a prompt. In multi-agent workflows and task orchestration, you also have to handle async coordination and locking when multiple workers touch the same target files.
Q9: Can long context windows replace RAG and external memory?
A: No. A long context window only expands single-turn working memory. RAG and external memory solve a completely different set of problems: authority boundaries, lifecycle governance, cost and attention control, cross-session state, and auditable replay. Even with a 1M or 10M token window, you cannot mash the data plane and governance plane into one flat prompt.
In our own platform design, four realities made this unavoidable:
- A flat token sequence cannot express trust levels or lifecycles. We deliberately split context into separate lanes:
Active Objective(authoritative goal anchor, pinned and never trimmed),Sea Facts/Evidence(data-lake evidence carrying issuer, lineage, watermark, and freshness),MemoryClaim(taggedunverified/observed/validated/deprecated, treated as low-trust advice until promoted),Knowledge RAG(versioned documents treated strictly as data, never policy), and short-termSessionstate. Dumping untrusted external logs, stale hypotheses, revoked rules, and authoritative policy into one flat prompt collapses trust boundaries, magnifies indirect Prompt Injection risk, and breaks tenant isolation, expiration, and revocation. - Fitting in the window does not mean computing accurately or affording the bill. In X-Pulsar we never tried to fill a 1M window. Default soft compaction triggers at one-quarter of the model window (minimum 32K), protecting the three most recent atomic tool groups and the latest successful result, trimming historical tool output before touching the main conversation. Telemetry and sandbox responses are capped at 16K characters / 64KiB escaped bytes. Reality bites fast: piling up context drives latency and cost through the roof and causes Context Rot, where stale tool noise buries fresh evidence. On top of that, LLMs are inherently unreliable at exact computation over large text. Feed tens of thousands of log lines into the window and the model still botches deduplication, exact counts, and version comparisons. That is why we built
run_file_analysisto drop uploaded files into the X2-Halo sandbox for exact Python computation, and routed vulnerability version checks to deterministic lookups in X2-Sea instead of reading them through the window. - Progressive disclosure beats dumping everything up front. Skills only expose lightweight name/description entries in the prompt and pull full bodies and references on demand. Knowledge combines semantic search with directory listing and windowed reads. The multi-agent blackboard injects only an
INDEX.mdinto sub-agents, which then fetch specific facts by key. - Cross-session continuity and compliance replay require persistent storage. A context window dies when the session ends. It cannot support entity-graph correlation across weeks and hundreds of cases (ClickHouse plus Graphiti), nor can it satisfy SOC compliance questions like “which exact snapshot of data backed that decision, and what was redacted or truncated?”
Put simply, long context did not kill RAG; it killed low-quality, overly fragmented chunking RAG. RAG evolved from a poor man’s workaround for small windows into a layer for permission filtering, freshness routing, and coarse localization. Find the right documents there, then use the longer window to read the key evidence whole. // To be fair, we never finished unifying this ourselves: several memory paths still coexisted in the platform, and RAG stayed one-way static injection without usage feedback write-back.
Q10: Does a reasoning model’s “deep thinking” equal real planning capability?
A: No. Deep thinking in a reasoning model is implicit deliberation inside a single turn. It is good at logical reasoning in a closed world. The planning an enterprise system needs is an explicit, durable state machine in an open world, with a versioned DAG, pre-execution risk gates, state reconciliation after environmental feedback, interruption recovery, and failure rollback. What an agent needs is an Actionable Environment, Complete Context, and Verifiable Results. None of those can be produced by thinking, so thinking alone cannot be real planning ability either.
The gap between the two is stark:
- Ephemeral thought traces vs. persistent versioned plans. Deep thinking lives inside a single API response stream; restart the process and it vanishes. External systems cannot inspect, suspend, dispatch, or reconcile it. In our Governed SOC design, planning is broken into immutable, versioned engineering objects:
StrategicIntent->Mission->Goal->immutable PlanVersion->PlanTask(DAG)->TaskExecution->Attempt->ActionInvocation, not a paragraph of internal monologue. - Dynamic uncertainty in open environments. Security investigations and pentests operate under partial observability: incomplete asset inventories, lagging logs, external tools returning 429 or 422 at any moment. Before getting real observations, reasoning models love to hallucinate ten steps ahead only to have step 1 contradicted by reality. We even had to add an
EMPTY_RESPONSEretry fallback specifically for reasoning models, because they frequently burned their entire turn budget inside privatethinkingblocks and emitted neither visible text nor a tool call. Thinking deeper sometimes caused action paralysis. - Thinking it through is not permission to execute. High-risk actions like isolating hosts, pushing blocks, or running exploit verification must be exposed structurally up front so they can pass Policy Gates, budget checks, dry-runs, and HITL approval. Private thinking traces (especially Anthropic’s
redacted_thinking) are opaque and unauditable, so they can never serve as a compliance plan. - The hard part of planning is recovery, not drafting step 1. Writing a tidy step list is easy. Closing out cleanly after step 3 fails and step 4 times out with
RESULT_UNKNOWNis hard. That requires failed-approach tracking, independent read-after-write verification, and a control plane that decides whether to retry, degrade, or escalate to a human.
So the division of labor is clear: deep thinking is for local, high-complexity cognitive nodes (attack-path hypotheses, multi-source log attribution, drafting a Plan), while global state, dependency topology, gates, and recovery across hours belong to the deterministic control plane.
Q11: Is “emergent intelligence” from multi-agent collaboration actually real?
A: Dropping several copies of the same model into a group chat and expecting superhuman intelligence to emerge out of thin air is mostly a myth in production, and often produces negative emergence. What is real and reproducible is the system-level gain from context isolation + least-privilege division of labor + structured shared state + deterministic arbitration. When we made the late pivot to replace single-agent + standalone security MCP engines with native multi-agent teams, that engineering discipline was the reason, not hopes of chatroom magic.
Why does “group-chat emergence” usually fail? First, the agents usually share the same underlying model, meaning identical blind spots and sycophancy. One agent invents a plausible wrong inference, the others rationalize it, and you get high-confidence group hallucination. Second, every round of natural-language handoff drops detail and adds noise. Without strict fan-out caps and delegation topologies, multi-agent setups quickly devolve into infinite mutual delegation and runaway token bills.
%%{init: {'theme':'base','themeVariables':{'fontFamily':'Arial, PingFang SC, Microsoft YaHei','primaryColor':'#E8F1FF','primaryTextColor':'#10233F','primaryBorderColor':'#3568A8','lineColor':'#55708F'}}}%% |
Figure 3: Free-form group chat vs. engineering-isolated multi-agent collaboration. The real gain comes from context isolation, privilege narrowing, and deterministic arbitration, not conversation.
Multi-agent design that actually works is remarkably restrained:
- Context isolation and attention hygiene: Sub-agents never see the Supervisor’s conversation history. They boot from zero with a clean
TaskEnvelope(explicit objective, acceptance criteria, out-of-scope boundaries) and their own skills. Even more important is data-plane isolation: tools that pull massive raw telemetry belong exclusively to sub-agents. The Supervisor cannot even see those tools and only consumes condensed, structured findings. It is essentially process memory isolation from operating systems, keeping tens of thousands of raw log lines from polluting high-level decision making. - Least privilege and topology bounds: Explicit team rosters, no ad-hoc pulling of arbitrary tenant agents, no recursive Supervisor-delegating-to-Supervisor chains, strict fan-out caps, and a hard split between
read_onlyandmutatingactions. Data connection scopes narrow via parent-child intersection so a sub-agent can never escape its parent’s permissions. - Structured blackboard instead of free chat: An append-only event log backs the shared blackboard with single-writer ownership. When a non-owner writes to an existing key, it never silently overwrites; it records an explicit
conflictevent. Internal and external untrusted data carry distinct trust labels, and decisions cannot be committed directly from untrusted external content. - Deterministic harness aggregation instead of smoothing over disagreement: The platform does not rewrite the model’s final answer, but it deterministically reconstructs a delivery report from canonical transcripts and the delegation ledger, laying out conclusions, rejected findings, conflicts, unresolved items, and unverified runs. Real multi-perspective value comes from preserving disagreement and falsifying claims with external tools or sandbox evidence, not voting toward a mushy consensus.
When we moved pentest capability off the old black box and onto native multi-agent (SuperNova) plus the X2-Halo sandbox, the real gain was not a few agents chatting their way into hacker intuition. It came because recon, validation, analysis, and reporting naturally fit parallel throughput, isolated context windows, shared sandboxes, and unified auditing. The rule of thumb is simple: divide-and-conquer noise reduction + parallel speed + privilege narrowing + evidence cross-falsification. If one clean context can finish the job, forcing multi-agent almost always costs more than it pays back.
Q12: Does a stronger model automatically mean a better agent? Why do tasks sometimes break after a model upgrade?
A: No. Agent performance is the coupled product of base model capability × Harness (context engineering, tool contracts, state machine, governance gates, verification loops). Upgrading the model replaces the central nonlinear component in a complex control loop. It easily breaks the fragile balance between the old model and the old harness, which is how you get higher benchmark scores alongside lower production completion rates.
We hit this repeatedly in practice, usually from seven root causes:
- Protocol and reasoning-block drift: Newer models introduce
thinking,redacted_thinking,thinking_signatures, or newfinish_reasonvalues, or burn an entire turn in private thinking and emit an empty response. If the harness lags behind on passing signatures back or classifying terminal states, multi-turn sessions die mid-flight with protocol errors. - Defensive prompts written for older models backfire on new ones: Earlier iterations piled up rigid formatting crutches to keep weak models on track (forced single-step calls, explicit THOUGHT/ACTION templates, heavy JSON wrappers). Put a strong native function-calling model into those rules and they clash with its training distribution, causing hesitation, repetitive confirmations, or broken formatting. If model tier profiles are not updated alongside the model, it may also inherit tiny truncation budgets or low iteration caps meant for weaker tiers.
- Context compaction mismatch: One memorable real bug: our early soft-compaction threshold was hard-coded at 8,000 tokens. When we plugged in a 1M-window model, compaction kicked in at 0.8% of the window and silently stripped the fresh tool result the model had just received. The model thought the data was missing and looped endlessly calling the exact same tool. We fixed it by deriving compaction dynamically at 1/4 of the model window and protecting recent tool groups.
- Tighter safety alignment collides with security work: Newer models often ship with stricter refusals. In malware analysis, attack-log triage, and authorized pentesting, upgraded models are more likely to refuse outright or call
ask_humanexcessively, stalling workflows that previously ran smoothly. - Higher capability triggers over-agency: The old model obediently followed a 4-step playbook and wrapped up. The stronger model decides it can dig deeper, launches extra exploration rounds, writes complex ad-hoc scripts, and hammers telemetry until it slams into
max_iterations, timeouts, or X2-Sea’s 422 budget and 429 concurrency limits. - Parallel tool calls expose hidden backend concurrency bugs: Older models called one tool per turn and masked concurrency defects. Newer models fire 3-5 tool calls in parallel or dispatch multiple sub-agents at once and blow up shared locks. We hit a real deadlock in our sandbox adapter: parallel sub-agents on the same event loop held a synchronous
SELECT ... FOR UPDATElock across a remoteawaiton sandbox bindings, freezing the entire event loop until we serialized per-session operations with an async lock. Likewise, X2-Sea only grants 4 concurrent query slots per tenant, so aggressive parallelism triggers 429s fast. - Tool schema ambiguities surface: Stronger models follow JSON Schemas and descriptions more literally, exposing sloppy tool docs, implicit defaults, and field mismatches that older models accidentally glossed over.
Treat model swaps as high-risk releases, never as minor config tweaks. Run fixed regression suites before rollout (X2-Orbit benchmarks plus historical trajectory replays) and track completion rate, tool error rate, refusal rate, step counts, concurrency conflicts, and cost per case together. Keep absorbing provider quirks into a canonical middleware layer so you never have to gamble on an all-at-once cutover.
Q13: How much traditional software engineering actually lives inside an AI platform like this?
A: Slice open the codebase and actual LLM call code accounts for less than 5%-10%. The other 90%+ is hardcore traditional software engineering. The closer AI gets to enterprise production, the higher the share of traditional software engineering becomes, not lower.
Six concrete pillars from what we actually built:
- Distributed scheduling and durable execution: Dedicated Celery queues by workload (agent tasks, default, IM, governed runtime) paired with Celery Beat periodic jobs, with fail-closed startup eligibility checks (single-tenant mode and Alembic revision head validation). The governed execution layer runs an explicit state machine (
PLANNED->QUEUED->CLAIMED->RUNNING->COMPLETED/CHECKPOINTED/FAILED_SAFE/RESULT_UNKNOWN/LEASE_EXPIRED) using leases, heartbeats, fencing tokens, and generations to prevent split-brain overwrites on timeout retries. Outbox, idempotent inbox, and an Execution Authority Matrix handle classic distributed problems like keeping background runs alive when a browser disconnects and reconciling across services with local transactions instead of 2PC. - Resource management, isolation, and backpressure: Deterministic token budgeting for context (including a 1.15x safety margin, 128-tool cap, and 1MB schema cap), plus exact escaped-byte accounting for transcripts under a 64KiB budget (correctly counting 6 bytes for CJK characters and 12 for emoji).
X2-Halosandboxes handle session bindings, working-directory boundary checks, command timeout trimming, interrupted file-write reconciliation, and per-session coroutine locks.X2-Seaenforces time-window limits, per-tenant concurrency slots, and explicit 422/429 backoff; Redis enforces 5-second socket timeouts and bounded local caches against stampedes. - Storage engineering and concurrency consistency: Strict single schema authority via Alembic-only migrations, banning runtime
create_all()mutations and gating changes with real PostgreSQL migration tests. Multi-agent blackboards use append-only event logs plus derived indexes (eliminating O(N) rewrites), and each Case enforces a single execution owner. Cold/hot separation stays strict: operational hot paths stay in PostgreSQL, Redis, and SSE; large artifacts go to MinIO/S3; massive telemetry and replay logs go to ClickHouse and Kafka, never letting the analytics lake onto the hot path. - Middleware pipelines and compiler thinking: Tool execution flows through an onion middleware chain (environment filtering -> pagination -> actionable error hints -> large-result spilling and redaction). Structured-output validation treats model output as untrusted external input, capping JSON Schema depth at 32, node count at 4,096, regex execution at 0.01s against ReDoS, and disabling external
$refresolution, straight out of compiler frontends and defensive parsers. - Security engineering and a zero-trust control plane: PDP/PEP separation plus a
safety_epochkill-switch counter so emergency stops invalidate existing Grants immediately and kernel failures fail closed. Tenant, user, and connector scopes are resolved strictly server-side from auth context, never trusted from model inputs (preventing IDOR). Prompt-injection fencing runs NFKC folding, strips invisible Unicode characters, and escapes boundaries. Credentials stay behind Vault/SecretRefand never enter prompts or receipts. - Configuration governance, observability, and test infrastructure: Four-tier feature-flag precedence (
DB > env > Settings > default) with Redis cross-process invalidation and audit logs. OpenTelemetry end-to-end tracing, Prometheus metrics,structlog,llm_snapshots, and a strict ban on silent degradation. Unit tests, real PostgreSQL+Redis integration tests, migration tests, fault-injection matrices, and Playwright E2E all execute in isolated k3s Job pods.
Q14: Is tool calling a core bottleneck for agents or a solved surface problem?
A: Split it into two layers. Formatting valid JSON arguments and emitting a function call according to protocol has already become a surface problem. What remains one of the hardest bottlenecks in real-world deployment is the surrounding Tool Harness: semantic abstraction, dirty-output handling, actionable error feedback, trust isolation, and side-effect verification.
The bottleneck is not making the call; it is four deeper problems behind it:
- Tool granularity is really OS ABI design for AI. Wrapping hundreds of fine-grained enterprise REST endpoints directly as MCP tools blows past context and schema limits (we capped tools at 128) and confuses model selection. Handing the model a naked shell instead throws away permission boundaries and auditability. The right split is layered: compress high-frequency deterministic reads into clean semantic primitives (like 8
telemetry_*tools drilling from sources -> entities -> signals -> counts -> raw events), and route long-tail open computation to a controlled sandbox (X2-Halofor file analysis and scripts). - Output impedance mismatch: what comes back is harder than what goes out. Real SIEMs, EDRs, and scanners routinely return megabytes of noisy JSON, while LLM context is brittle. We poured heavy engineering into this: automatic pagination, large-result disk spilling with byte-sliced read-back, strict “redact -> project -> cap” pipelines on telemetry that preserve evidence references, and isolating raw event lookups to sub-agents so they cannot flood the Supervisor’s context.
- Errors must be actionable for an AI. Often an agent is not failing at tool syntax; the tool’s error messages are just hostile to AI, causing it to ram the same wall repeatedly. We built an error-hints middleware that translates raw exceptions into concrete next steps: for example, telling the model on a 422 budget error not to retry verbatim, but to shrink the time window, drop datasets, or add keywords, and on coverage refreshes to use other tools and retry in five minutes. That kind of granular feedback often lifts success rates more than upgrading to a pricier model.
- Every tool call crosses a security boundary. Reads return attacker-controlled content that must be redacted, stripped of invisible characters, and fenced. Once writes carry real external side effects (host isolation, account bans, rule changes), the problem stops being “can it invoke the API?” and turns into Grants, idempotency, reconciling
RESULT_UNKNOWNtimeouts, and independent post-action verification.
Function-calling syntax stopped being the bottleneck a while ago. Turning fragile enterprise APIs built for humans into an environment that is AI-friendly, enterprise-safe, observable, and verifiable is the ongoing core engineering grind.
Q15: Do existing security datasets hit diminishing returns on security tasks?
A: Steep diminishing returns, and on general static security datasets we are already near the ceiling. Public static datasets still work well for cold-start factual baselines (getting from 0 to 60) and regression floors. Getting a security agent from 70 to 95 does not come from feeding more static samples; it comes from dynamic interactive trajectories + real business context + verified production decision feedback.
Static datasets decay especially fast in security:
- Adversarial non-stationarity: Attack techniques and cloud or supply-chain bypasses shift every month, while internal enterprise baselines drift too. Last year’s static alerts miss new attacks and trigger false positives on new legitimate traffic.
- Public benchmark contamination and saturation: DVWA, Juice Shop, OWASP Top 10, historical CVEs/CWEs, public SigmaHQ rules, and MITRE ATT&CK text are already baked into frontier model pretraining. Fine-tuning or scoring on them produces fake progress: great test scores, poor performance in customer environments.
- Static datasets cannot teach sequential exploration: Real SOC investigations and pentests are multi-step exploration loops. You check asset inventory before choosing which log index to query, and probe response headers before picking the next validation step. Single-turn Q&A cannot teach hypothesis formation, evidence gathering, falsification, and course correction. In our own
X2-Orbittesting onBM-001, 12 iterative rounds pushed the composite score from 0.223 to 0.716. The bottleneck above that was never “find another 1,000 static samples”; it was cross-product evidence attribution, real detection rule generation, and closed-loop verification. - The most valuable security data is private and deeply contextual: The exact same “PowerShell remote execution at 3 a.m.” alert is a scheduled maintenance release at Customer A and ransomware lateral movement at Customer B. Public datasets will never tell you a specific customer’s asset criticality, change windows, historical allowlists, or analyst judgment.
Used properly, security datasets split into three tiers. General security Q&A, CVE summaries, and basic rule syntax are saturated; base models already cover them, so fine-tuning has poor ROI. Structured reference facts like OCSF/OSSEM schemas, ATT&CK mappings, Sigma templates, and exact vulnerability-version tables should not be fine-tuned into weights; put them into data lakes and knowledge packs for deterministic lookup. The real moat with high marginal return sits in three kinds of data no competitor can buy off the shelf: live-range attack->detect->remediate trajectories, production analyst decisions (accept, reject, override) paired with independently verified outcomes, and hard negatives plus failure-recovery traces (legitimate ops that look like attacks, malicious logs carrying prompt injections, and tool-timeout recoveries) to drive down false positives and hold the governance floor. // There even seem to be startups built specifically to collect this kind of interaction data.
Autonomy, Interaction, and Security Control
Q16: How do you turn enterprise autonomy levels (L1-L5) from slideware into a measurable, promotable, auto-demoting product contract?
A: Claiming “our platform has reached L4/L5 autonomy” without naming specific actions and asset scopes is pure marketing fluff. In enterprise security, autonomy is never a global property of a model; it is a local, reversible authorization inside a three-dimensional matrix of action risk level × asset criticality × tenant policy. At the exact same moment, pulling logs and correlating evidence can run automatically at L4, blocking a test-subnet IP can run at L3 with post-hoc sampling, and isolating a core database stays locked at L2 dual human approval forever.
Making it a real product contract takes two strict gates. Promotion has to move through Shadow->Supervised->Scoped Auto: new capabilities run on live traffic in shadow mode first, emitting verdicts and audit trails with zero side effects, and only unlock customer-approved promotion after clearing hard thresholds on sample size, analyst override rate, zero high-severity misjudgments, and independent verification pass rate. Demotion has to be even faster than promotion: consecutive verification failures, spiking reopen rates, broken data feeds, or safety-state changes trigger immediate one-way downgrade, never raising autonomy on failure.
Looking back at our own build, our governed_runtime and investigation admission policies followed this model solidly and defaulted to shadow mode. The cost showed up too: governed_runtime alone grew past 150 files, with a deep formal state machine and promotion model, while frontend UX lagged behind. If a customer admin cannot tell in ten seconds why an action was blocked and what metrics unlock it, they will not study the manual; they will just flip governance back to off.
Q17: As HITL approvals multiply, won’t “alert fatigue” just turn into “approval fatigue”?
A: Very likely, and it is one of the easiest traps for an Agentic SOC to walk into. Traditional SOCs ignore 1,000 alerts a day; if AI pops up 200 approval modals a day, analysts quickly turn into rubber stamps clicking Approve without reading. That is actually worse than no approval at all, because it creates a compliance illusion that a human reviewed and endorsed the action.
Fighting approval fatigue takes at least three product mechanisms:
- Interrupt humans only for irreversible or high-blast-radius actions. Read-only investigations, evidence aggregation, and draft proposals should never ask for approval. Low-impact reversible actions (like short-lived rate limiting) belong in timeout-based auto-approval or batch digests rather than one-by-one popups.
- Design approval UIs as 15-second decision cards, not 20-turn chat transcripts. Every card should answer five fixed questions: what action will run, which assets are affected (blast radius), the core evidence links, how to roll back if approved, and what happens if ignored.
- Measure rubber-stamping itself as a governance metric. If an approver averages 1.5 seconds per modal with a 100% approval rate, the approval flow has already failed and should trigger noise reduction, batching, or sampling audits.
We eventually pulled human work items out of inline ask_human chat prompts into a unified queue split into decision, input, review, and notification items with deadlines and escalation, which was a big step up from blocking chat sessions. Even so, batch approval for low-risk items, standardized rollback previews, and rubber-stamp monitoring never got fully finished.
Q18: With non-deterministic AI, how do you turn coverage gaps and honest refusals into a trust moat instead of a UX penalty?
A: There is an uncomfortable commercial paradox here. Buyers always say “no hallucinations, tell me when you don’t know,” yet in a live POC, a competitor that confidently hallucinates inside a pretty layout often looks smarter at first glance than a disciplined system saying “insufficient evidence.” Saying “I don’t know” by itself loses to demo theatrics. Only honest boundaries + actionable gap-closing steps win long-term retention.
In the UI, three states must never blur together: “checked and clean,” “missing source / timed out / unknown,” and “still running.” Never disguise a failed read as zero or an empty list. We held a strict line on engineering honesty: quality metrics return null+reason when authoritative facts are absent, and multi-agent delivery always surfaces unresolved items and unverified_runs. Still, honesty cannot stop at a disclaimer paragraph. Expose gaps structurally (for example, “3 of 5 sources checked; EDR connector lagging 45 minutes; asset owner missing”) and put one-click recovery buttons right next to them (configure connector, widen window and rerun, hand off to analyst). A screen full of gray unavailable/degraded warnings with no next step just frustrates operators. Honesty needs an action path.
Q19: With foundation models leaping forward every 3-6 months, what should you build thick, and what must stay thin enough to delete?
A: The biggest architectural waste in AI products is pouring engineering months into glue layers that patch today’s temporary model weaknesses, only to have the next model solve them natively six months later, turning your code into dead weight. We learned that firsthand when we had to rip out our early FactVerifier, HonestyAgent, and DIRECT modes.
The thick vs. thin boundary is fairly clear:
- Build thick (compounds as models get stronger): The fact plane and canonical data model (normalization, entity resolution, asset inventory, long-term evidence retention and replay); the governance, authorization, and audit kernel (tenant isolation, Policy Gates, approvals, Grants, emergency stop); enterprise connectors and controlled execution bases (MCP adapters, sandboxes, private deployment delivery); and private closed-loop operational data (real analyst feedback, verified outcomes, domain knowledge packs, dynamic benchmarks).
- Keep thin, pluggable, and disposable: Intricate hand-crafted prompt scaffolds, rigid output templates, and multi-stage prompt patches; elaborate pure-LLM self-critique or reflection loops trying to talk hallucinations away; and lofty “general cognitive architecture” abstractions not grounded in hard operational facts.
Betting heavily on the control/governance plane, fact lake, sandbox, and contracts ages well across model generations. By contrast, adaptive prompts, self-reflection, dynamic replanning, and conceptual cognitive layers that have not proved measurable gains in production loops need regular ROI audits. If the next model natively solves 90% of a problem, stop maintaining a brittle app-layer substitute.
Q20: If you assume the foundation model will be bypassed by indirect Prompt Injection, how does the system layer stop an agent from turning into an insider?
A: In security, any architecture that expects a better-written system prompt, or an added LLM guard model, to fully stop Prompt Injection does not pass. A SOC agent reads attacker-crafted logs, email, code, and web pages at high frequency every day. The only premise that holds up is: assume the LLM can be hijacked at any moment, and defend it as an untrusted decision component. // The same way there is no absolutely secure system, there is no absolutely trustworthy LLM.
Real defense in depth has to live in system boundaries:
- Complete credential and identity isolation: The model never touches raw API keys, tokens, or Vault secrets, and model arguments never choose
tenant_id,user_id, or target endpoints; the server binds all of them from authenticated context. - Read/write separation and taint awareness: Tag external untrusted data explicitly. Once a context touches untrusted external input, any high-risk write or authoritative decision must pass independent confirmation or a deterministic policy gate.
- Do not overlook exfiltration through “read-only” tools: Even if every write tool is disabled, a hijacked agent that can both read sensitive internal data (logs, knowledge base) and make outbound requests (
web_fetch, web search) can leak secrets stuffed into URL queries or search terms. High-sensitivity investigation sessions need strict policy isolation or domain allowlists on outbound web tools. - Target-bound Grants and deterministic validation: Bind authorization to exact targets and canonical parameters so a hijacked model cannot swap targets at execution time.
On our side, the untrusted-data fence (scoped honestly as prompt hygiene, not a security boundary), the shared blackboard’s refusal to commit a decision from untrusted external content, and server-side resolution of the tenant boundary were reasonably solid. Looking back through the code, two hard gaps were still there. The safety interceptor still treated a tool as read-only when its name contained read, get, or check, which is much more brittle than an explicit capability allowlist; everything outside that list should default to mutating. And the interactive main path was still sitting on shadow instead of enforce, so the exfiltration boundary for the “internal read + outbound web read” combination was never fully closed.