Skip to content

Tracking Issue: DSH reliability and cross-Agent PowerContext guidance #1450

Description

@knqiufan

Feature description

Make the DSH installation-to-recall journey diagnosable and make PowerContext tool/Skill routing consistent across maintained Agent integrations.

This is a focused follow-up tracker for a reported user journey: install the plugin, connect to a compatible Server, observe automatic recall/capture, and use natural-language Memory or Handoff requests correctly. It records independently deliverable work and acceptance criteria. Child Issues should own implementation and closure.

Problem and proposed solution

Reported user experience

A PowerContext 0.1.0 user reported that:

  1. The DSH plugin loaded and exposed pc_* tools, but calls returned Error: PowerContext Server returned HTTP 404.
  2. Automatic recall, capture, and injection were not apparent in the conversation, leading the user to suspect that the hook was not registered.
  3. Tool descriptions and Skill discovery gave weak guidance. In the reported interaction, the Agent started with pc_memory_list as if listing stored entries were the normal way to restore context.

The user suggested a using-powercontext routing Skill with more focused domain Skills. This is useful as an additional guidance layer, while per-tool descriptions remain necessary because an Agent can call an exposed tool without loading a Skill.

Evidence boundary: these are reported symptoms, supplemented by source inspection. The original failing endpoint, response body, installed plugin revision, and exact DSH version have not been captured here. A wrong endpoint, proxy/base-path configuration, or mismatched Server/plugin revision are possibilities; the status code alone does not establish which occurred. An empty Memory store is also different from a missing HTTP route.

Verified current gaps

Source baseline: PowerContext master f0f288a, inspected on 2026-09-04. Released 0.1.0 and current master must be qualified separately.

Area Current behavior and consequence
Error boundary Tool execution and the registered command handler resolve Scope before entering the operation error boundary. Scope failures can escape as host tool errors. Even /pc doctor depends on successful Scope resolution before it reaches its health checks.
404 interpretation Direct operation mapping maps every HTTP 404 to not_found. Diagnosis must distinguish required-route failures from valid missing-resource/domain results using operation context and typed errors.
Automatic path Scope resolution in recall can fail into a silent catch before prepare/capture diagnostics run. Successful/empty prepare results go to debug logging; injected context has no structured snapshot presentation metadata.
Installation diagnostics doctor dsh checks CLI availability and plugin registration, not the endpoint actually used by the running plugin. The DSH guide leads with --ref master and lacks a complete adjacent, release-matched startup journey.
Guidance Tool descriptions do not clearly distinguish inventory from contextual search. The Skill registration and system guidance provide limited routing. Some candidate-generation tools already mention human approval; those safeguards should be retained and made consistent.

Preserve the existing contracts

  • Automatic hooks remain responsible for bounded recall and prompt capture. Manual tools supplement that path when the user explicitly requests an operation or needs additional retrieval. Guidance must not claim recall succeeded merely because a hook is configured.
  • Explicit “remember/save this” and “search my memories” requests require the corresponding tool and honest reporting of its result. Automatic Source capture is not an explicit Memory write. Ordinary coding prompts must not trigger redundant remember, list, or search calls.
  • Preserve the existing plugin diagnostics contract: typed classification, domain errors handled first, content-free diagnostics, bounded presentation, and the supported host channel. DSH currently uses the plugin logger. Diagnostic failures must not break normal Agent work.
  • Do not inject a failure form: notice message into model context. That conflicts with the current diagnostics contract. Any additional DSH UI channel needs an explicit presentation decision and, if it changes that contract, design review first. Snapshot metadata may describe real recalled content; it must not fabricate successful recall.
  • Diagnostic events and model-facing failures must not contain raw endpoint URLs, credentials, request/response bodies, or user content. An explicit local Doctor/status surface should identify the effective configuration through appropriately redacted output.
  • Preserve Scope isolation, exact citations, untrusted historical evidence, and human-controlled candidate approval. Listing or generating a candidate does not approve, publish, install, or execute it.

Proposed child Issues

Work packages A, B, and C have linked implementation Issues and merged PRs below. D is implemented in #1522 and ready for review; it is not merged. E and F remain proposed work packages awaiting their own Issue links and ownership. Each child should include a focused reproduction/scenario, scope, acceptance, documentation, and validation; normally one implementation PR, with a second host-projection PR when needed.

Sequence and existing ownership

A, B, and C are complete on master. D's implementation and qualification evidence are in #1522, now ready for review; D remains unchecked until its delivery is merged and accepted. The PR distinguishes first-turn routing scores from multi-turn Handoff validation and retains measured model limitations. E follows agreement on D's routing semantics and the canonical-source compatibility decisions. F consumes the outcomes established by A–C. Merged master support does not by itself establish availability in a released package.

Existing work Relationship
#1352, #1338, and the manifest delivered by #1357 Product roadmap, capability alignment, and per-host availability remain there. Use integrations/capabilities.toml to enumerate qualification targets.
#1405 / #1410 Own canonical plugin source, naming, generated distributions, migration, and drift prevention. This tracker supplies guidance requirements and acceptance evidence. The RFC PR is currently open.
#1406 / #1408 Own future immutable release installers. C improves the current DSH journey without replacing that architecture; the RFC PR is currently open.
#1298 / #1360 / #1361 Established service and plugin-diagnostic work. A–C close specific DSH integration gaps rather than recreate the service layer or common diagnostic system.
#1370 and #1378 / #1436 Required DSH service registration and explicit Codex Memory routing are already addressed. Preserve them as baseline behavior.
#1448 Root README release/master separation and the powercontext-v0.1.0 ref correction are already merged; only remaining DSH-specific gaps belong here.
#1362 and #1449 New lifecycle coverage and first-start Scope/Dashboard onboarding remain separately owned. This tracker does not redefine lifecycle events or default Scope creation.

Tool-count reduction, DSH/MCP parity, Handoff read/edit classification, and approval behavior without an interactive channel need separate design decisions. A settings card, DSH peer/type baseline updates, and release-version hygiene can become independent follow-ups after concrete gaps are verified; they do not block the reliability fixes. Public API, compatibility, or substantial architecture changes follow the RFC process.

Validation and completion

Children should protect observable behavior rather than exact prose, arbitrary keyword counts, internal call order, or a fixed number of tools.

Required acceptance evidence:

  1. A clean, version-matched DSH setup captures a known Source. With the required Memory-processing configuration and a deterministic fixture, it produces Memory and recalls the expected context in a subsequent session using the same intended Scope. Verify capture, processing, and recall separately; a valid empty result remains a successful diagnosed state.
  2. Route mismatch, domain absence, authentication failure, timeout, empty recall, and missing Scope remain distinguishable; diagnostics/status work during failure and never turn failure into saved Memory or injected context.
  3. English and Chinese scenarios cover ordinary coding, continuing prior work, explicit remember/search, inventory, Handoff, candidate review, and unavailable tools. Record host/model/configuration, the baseline failure, actual calls/results, and evaluation limits. Description keywords alone do not establish reliable Agent behavior.
  4. Exact citations, Scope isolation, explicit-write semantics, human Review boundaries, bounded injection, and diagnostic redaction remain intact.

Relevant commands for child work, as applicable:

pnpm --dir integrations/dsh/plugins/powercontext test
pnpm --dir integrations/dsh/plugins/powercontext run test:e2e
uv run pytest tests/test_dsh_cli.py tests/e2e/test_dsh_http_chain.py -q
make docs-test

Use each affected host's own checks. If the OpenAPI contract changes, edit openapi/powercontext.yaml, regenerate with make api-generate, and run make contract-test; do not hand-edit generated clients.

Close this tracker when A–F have linked delivery and acceptance evidence for their agreed host/version scope. Any deferred work must have an explicit disposition and an independent Issue where appropriate; it must not be marked delivered. Released and master-only support must remain distinguishable. Child PRs should close their child Issue and reference this tracker rather than close the entire tracker.

Alternatives considered

  • Only expand tool descriptions: improves immediate selection but leaves failure diagnosis, workflow detail, and cross-host drift unresolved.
  • Only add a router Skill: insufficient when a model calls an already-visible tool without loading the Skill.
  • Only fix Server connectivity: necessary, but leaves redundant inventory/search and misleading explicit-memory acknowledgements possible.
  • Combine everything in one implementation Issue/PR: couples urgent fixes to packaging and Skill design. Independent children keep acceptance and delivery bounded.

Additional context

This proposal is based on the reported user experience and current source/contract inspection. It does not claim an end-to-end reproduction of the original user's environment or completed Agent-routing evaluations. Child Issues should capture exact versions and sanitized reproduction evidence before asserting a specific deployment root cause.

AI assistance: OpenAI Codex assisted with source inspection, existing-Issue reconciliation, and preparation of this proposal.

Are you willing to contribute to this feature?

  • Yes, I am willing to contribute code, docs, or design feedback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions