Skip to content

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

Closed as not planned
0 of 1 issue completed
Closed as not planned

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

A–D and F have merged implementation PRs. E is tracked in #1620 and implemented in #1622, currently under review.
Each child owns its implementation and acceptance evidence. E unifies Skill entries as powercontext-project-context and uses package-local references or registered DSH domains; the broader generated distribution architecture remains owned by #1405 / #1410.

Sequence and existing ownership

A–D and F are merged on master. E (#1622) builds on master 0ed20c54, including D and F, and uses the shared powercontext-project-context entry while #1410 owns the broader distribution architecture. Merged master support does not establish availability in a released package. Delivery checkboxes record merged implementation; they do not claim universal model acceptance.

E validation: #1622 addresses naming, documentation, test-scope and domain-read evaluation review. Current head f4b56ab7: all 21 checks passed. Main CI, native Windows/macOS/Linux services, SQLite/OceanBase acceptance. E remains unchecked until its PR is merged.

Aggregate acceptance remains open. E's raw 400-observation record distinguishes native loading tests from controlled model evaluation. The main 320-case matrix had 289 original automated passes and 262 transcript-reviewed acceptance passes. Review rejected response wrappers, Scope drift, inactive inventory, unsupported substitutions, invalid evidence and misleading reporting; the evaluator now rejects wrapper carriers and non-Handoff Scope changes explicitly. Two 40-case reading probes remain unqualified observations. D's earlier model limitations also remain recorded. The workflow-aware rerun adds 80 observations: 53 routing passes (40/40 ordinary/current-context cases and 13/40 requested-reading probes), with semantic acceptance still unqualified. The evaluator rejects router-only, wrong-domain and late reads; the report identifies 15 historical routing false passes without altering the original records. A further 16-case DSH/OpenCode run after aligning Handoff/preview guidance recorded 15 routing passes and one output-budget truncation; semantic reporting remains unqualified. See #1622 and its standalone evaluation report. Do not mark these residual observations passed or close this tracker automatically when E merges; reconcile the accepted model/host scope and assign any remaining work explicitly.

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

  1. knqiufan commented on Sep 4, 2026

    @knqiufan
    CollaboratorAuthor

    Alignment for D/E: system guidance, tool descriptions, and task-specific Skills

    Follow-up user screenshots from DSH's creation mode provide a useful concrete reference for work packages D and E. The cordis_* entries shown under Tool definitions are tools; the inspected source separately provides task Skills such as cordis-plugin-development. Their value is the coordination between three model-visible surfaces:

    Surface Responsibility
    System guidance Explain how the capability relates to the current Agent and task, its scope and limits, and which operation or available Skill matches the request.
    Tool description Explain one operation's purpose, prerequisites, result meanings, and essential follow-up constraints sufficiently for correct tool selection.
    Skill Supply the detailed workflow, examples, and troubleshooting when the task needs them.

    Source reference: DeepSeek Harness commit 76fda729, including the Cordis system guidance, cordis_run description, and development Skill.

    Proposed refinement to D

    Use the child title feat(integrations): align PowerContext system guidance and tool routing, and explicitly include the existing host system-guidance surface in its deliverables.

    • Explain PowerContext's relationship to the Agent: durable project history and handoff across sessions, Server-owned Scope selection, and historical evidence subordinate to current instructions.
    • Describe automatic recall/capture and explicit operations separately. Automatic processing is an attempted capability, not proof that retrieval or persistence succeeded.
    • Provide positive routing: relevant historical questions use focused search; explicit inventory uses list; explicit save requests use remember; handoff and review use their available workflows. Ordinary coding should not trigger redundant calls merely because tools are exposed.
    • State observable result meanings: accepted Source evidence is not necessarily produced Memory; a generated candidate is not an approved artifact; a failed operation must not be reported as saved or restored.
    • Keep tool descriptions independently useful while putting detailed multi-step procedures in Skills. Preserve PowerContext's own citation, authorization, and human-review rules rather than copying Cordis-specific approval or autonomous-retry behavior.

    PowerContext already registers GUIDANCE through systemPrompt.section; D should improve that existing mechanism. It can reference the currently shipped project-context Skill and therefore does not need to wait for E's naming/distribution changes.

    Refinement to E

    Keep feat(integrations): add layered PowerContext Skill routing, with explicit agreement between system guidance, the discoverable Skill catalog, and loaded Skill bodies:

    Acceptance evidence

    Inspect the actual model request/context browser for consistent system guidance, tool definitions, and visible Skill names; then evaluate task behavior with Skills available and unavailable. Cover ordinary coding, focused historical lookup, explicit inventory, explicit remembering, handoff, human review, and unavailable operations. Verify actual calls and honest result reporting. Longer descriptions or keyword counts are not acceptance criteria, and the screenshots/source alone do not establish improved model behavior.

    This refines D/E within this tracker. B continues to own automatic-path diagnostics and presentation of real recalled content; F continues to own accumulated operational status. The original tracker body is retained for traceability.

    AI assistance: OpenAI Codex assisted with source inspection and this alignment proposal.

  2. knqiufan commented on Sep 4, 2026

    @knqiufan
    CollaboratorAuthor

    Work package B is now tracked in #1457: bug(dsh): complete automatic-path diagnostics and recall presentation.

    Implementation is being developed on #1452's commit c776cddf, reusing A's error classification and Scope cancellation support. The registered-entry regression baseline is 28 tests: 8 passing and 20 failing on A. The fix will include real-Server e2e, built-plugin/real-DSH runtime checks, and recorded real-model Web usage before B is considered delivered.

    A is still open and its branch belongs to a fork. B's upstream PR will therefore explicitly identify the dependency and provide a B-only comparison, then remove inherited A changes after A merges. This comment records the agreed development sequence; the tracker body remains unchanged.

  3. knqiufan commented on Sep 4, 2026

    @knqiufan
    CollaboratorAuthor

    Follow-up for B (#1457 / #1459): the Windows CI failure has been diagnosed and fixed, with the independent Server defect recorded in #1463 and its small fix in #1464.

    The failure was caused by Windows text-mode writes expanding LF bytes in a 32-byte cursor signing key. The first Server process started, but restart rejected the longer persisted key. This is reproducible with a fixed input, so rerunning the same tests would only risk hiding the defect.

    The fix writes binary bytes, adds deterministic persistence/restart coverage to Windows CI, and prints Server logs directly on native-service failure. It is included in B at d2b3ee25. Both #1464 and #1459 now have 17/17 passing checks, including real Linux/macOS/Windows service lifecycle tests and SQLite/OceanBase acceptance.

    The earlier “admin rights” note concerned GitHub rejecting a request to rerun an old job. It was not the cause of the CI failure or a requirement for passing tests. GitHub's documented rerun requirement is repository write permission. The fix triggered normal PR validation without changing permissions or relaxing tests.

    B remains Draft while the live-model HTTP 401 acceptance gate and its A dependency are unresolved. This Server correction does not change the B scope or mark the remaining tracking work complete.

  4. PsiACE commented on Oct 5, 2026

    @PsiACE
    Member

    Closing this outdated tracker after its implementation work landed; remaining guidance and host-validation gaps will be revisited separately.

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