MCP servers report Connected but tool namespaces are not attached to the active session #708
Open
opened 2026-07-13 21:18:46 -05:00 by jcwalker3
·
1 comment
No Branch/Tag Specified
master
fix/issue-709-decision-lock-cross-profile
fix/issue-695-native-transport-quarantine
fix/issue-698-report-validator-schema
fix/issue-702-stale-binding-lease-recovery
fix/issue-699-structured-auth-mcp-errors
fix/issue-695-native-quarantine-v2
fix/issue-693-review-decision-lock-recovery
fix/issue-691-obsolete-reviewer-lease-cleanup
feat/issue-687-reconciler-branch-delete
fix/issue-683-workflow-guard-hardening
chore/issue-681-preserve-review-session-wip
feat/issue-604-anti-stomp-preflight
feat/issue-606-sentry-observability
fix/issue-671-block-stable-branch-push
fix/issue-675-residual-preflight-remediation
fix/issue-673-remediate-regressions-part2
fix/issue-673-remediate-regressions
feat/issue-603-lifecycle-labels
fix/issue-627-set-issue-labels-pagination
feat/issue-601-first-class-leases
feat/issue-612-incident-bridge
feat/issue-600-controller-allocator-api
fix/issue-620-head-scoped-review-locks
feat/issue-613-allocator-db-substrate
docs/mcp-stable-control-runtime-policy
feat/issue-609-prepared-review-verdict-resume
feat/issue-610-live-remote-parity
feat/issue-503-reviewer-active-worktree
feat/issue-470-preflight-contract
feat/issue-440-lock-recovery
feat/issue-440-branch-recovery
feat/issue-458-queue-fail-closed-copy
feat/issue-400-early-duplicate-work-gate
feat/issue-308-reconcile-inventory-pagination
feat/issue-308-reconcile-pagination-proof
docs/issue-261-agent-temp-artifact-cleanup
feat/issue-262-map-commit-files
fix/infra-stop-conflict-marker-false-positive
feat/issue-139-role-aware-task-routing
feat/issue-188-continuation-selection-wall
feat/issue-189-continuation-mode-proofs
feat/issue-232-refresh-wiki-proof-heads
feat/issue-210-block-workspace-edits
feat/issue-204-exact-issue-lock
docs/issue-80-label-taxonomy
docs/issue-79-safety-boundary-updates
v1.1.0
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#708
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Gitea MCP servers can report Connected at the CLI / host inventory layer while the active LLM session exposes none of their tool namespaces. Native workflow tools are therefore unavailable until an interactive
/mcpreconnect attaches the namespaces to the session.This is a session-attachment failure, not a missing config entry, not a transport-closed error, and not a stale-runtime self-kill path. The host believes the servers are healthy; the agent session still cannot call
gitea-author/gitea-merger/gitea-reviewer/gitea-reconciler/gitea-toolsuntil the operator performs a manual reconnect.Failure signature
/mcpreconnect (operator babysitting)Distinction from related issues
This issue is not a duplicate of the following; keep them separate:
gitea_resolve_task_capabilitystale path touches config +os._exit, causing client EOFDo not collapse this into config-drift, reconnect-exposure, resolver side-effects, or transport-closed trackers without explicit operator approval and evidence that the root causes are identical.
Impact
/mcpreconnect, re-run identity/capability preflight.Recurrence evidence (blocked PR #696 merger session)
PR #696 (
feat(guard): native MCP transport binding and contaminated-review quarantine (Closes #695)) is linked only as the observed blocked task, not as the implementation target of this issue.During a merger session targeting merged PR #696:
/mcpreconnect.PR #696 itself implements #695 (native transport binding / contaminated-review quarantine) and is merged. This issue tracks the session attachment / discovery defect that blocked that merger workflow class — it does not reopen #695 or re-implement #696.
Investigation requirements
Investigate and document (with tests where possible) the full client attachment lifecycle:
Client attachment lifecycle
Startup ordering
gitea-author,gitea-merger, …) leaving session with empty namespaces while later Connected flips true?Discovery cache
/mcpreconnect force rediscovery?Reconnect behavior
/mcpreconnect change that automatic session start does not?Candidate code/docs surfaces (non-exhaustive):
mcp_namespace_health.py,mcp_discoverability.py,mcp_session_state.py,mcp_daemon_guard.py,test_mcp_conn.py,docs/mcp-namespace-health.md, client integration notes for Antigravity/Codex/Grok CLI.Acceptance criteria
exact_next_actionthat is only the sanctioned reconnect path (no shell/process/config hacks). Prefer automatic attachment when safe.gitea_whoami(or equivalent) on the required role namespace, not CLI Connected alone.Workflow-safety requirement
When this failure is detected, workflows must fail closed and must never encourage or perform:
pkill/ process kill,touch/mtime config tricks,.envedits, or manual daemon launchesOnly sanctioned recovery: client attach/reconnect path, then full preflight (
whoami→ capability resolve → task).Related hard stops: #630 (no process-kill recovery), #695/#696 (no offline import after native transport failure), #678 (sanctioned reconnect exposure for clients that lack it).
Linkage
Explicit non-goals
Required implementation
gitea_whoami+gitea_resolve_task_capabilityonprgs-author(or the role implementing the fix); bind issue-backed worktree underbranches/only.exact_next_action.Closesthis issue; stop; hand off to independent reviewer. Do not implement from root checkout; do not merge from author role.Required final response and handoff
Author final response must include:
[THREAD STATE LEDGER] Issue #708 — quarantine-tool rediscovery outcome and containment of reviews 427/431
What is true now:
1eafb757a9.What changed:
1eafb757, production native transport was true, and the tool was decorated in server code, yet the tool was absent from client discovery and direct native invocation failed.1844e29880) quarantined natively with the schema-required confirmation string; audit comment 11465.6b675f5c83) quarantined natively with the schema-required confirmation string; audit comment 11467.What is blocked:
Who/what acts next:
Canonical Issue State
STATE:
containment-complete
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Fresh leased native reviewer session reviews PR #703 at its live head against issue #702 AC2/AC3. PR #701 requires a separate fresh native review before any merge consideration.
NEXT_PROMPT:
WHAT_HAPPENED:
Post-restart recurrence check on Issue #708: gitea_quarantine_contaminated_review attached to client discovery after reconnect plus client-side tool rediscovery; no further restart was needed. Reviews 427 (PR #694) and 431 (PR #701) were then quarantined through the native production transport, and readback proves both APPROVE verdicts are void for merge authorization while forensic evidence is retained.
WHY:
Both reviews were produced by non-native execution paths documented in issue #695 (offline-runner bypass for 427; run_submit.py direct-import with redirected .mcp_session_701 session-state directory for 431). Per #695 AC8 such verdicts are void and require durable quarantine records that the feedback, eligibility, and merge gates honor by review_id.
RELATED_PRS:
PR #694 (open state, review 427 quarantined), PR #701 (open state, unreviewed for merge purposes, review 431 quarantined), PR #703 (awaiting fresh reviewer).
BLOCKERS:
None for this containment task. Lease 11392 intentionally untouched per its last native assessment (cleanup_allowed=false, mutation_eligibility=prohibited).
VALIDATION:
gitea_get_pr_review_feedback readback on PR #694 and PR #701: quarantined=true on reviews 427/431, approval_visible=false, quarantined_approvals_at_current_head=1 each, stale-approval reason states the contaminated approval is void for merge authorization; gitea_check_pr_eligibility(PR #701, merge) returned eligible=false.
LAST_UPDATED_BY:
prgs-reconciler (sysadmin), native runtime at
1eafb757a9, server clock 2026-07-14T02:32Z.