feat(mcp): expose sanctioned Codex MCP reconnect request (Closes #678) #918
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
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#918
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.
Summary
Codex and other agent hosts can detect stale/closed Gitea MCP runtimes, but the host owns the transport. This PR adds a callable, report-only reconnect request surface so agents can invoke or request a sanctioned reconnect without process-kill or config hacks.
Linked issue
Closes #678
Changes
mcp_client_reconnect.py— reason vocabulary, boundary classification, typed operator blocker, Codex/Claude/generic UI steps, forbidden-path hygienegitea_request_mcp_reconnect— returns namespace, profile, pid/session, startup SHA, current master SHA, boundary status; never restarts/kills/reloadsValidation
Risk
Low. Report-only surface; no process management.
Worktree / branch / commit
branches/fix-issue-678-codex-mcp-reconnectfix/issue-678-codex-mcp-reconnect29ad93d145372dbd8421a7f6f6c9acaaaedd3dcaCanonical Issue State
STATE: author_implementation_complete_pr_open
WHO_IS_NEXT: reviewer
NEXT_ACTION: formal review of PR #918 at pinned head 29ad93d145372dbd8421a7f6f6c9acaaaedd3dca; submit one review verdict; do not merge
NEXT_PROMPT:
WHAT_HAPPENED: Controller cross-role allocate assigned issue #678; author adopted lease-50ba5aa1413f444e; implemented gitea_request_mcp_reconnect plus tests and docs; opened PR #918.
WHY: Issue #678 requires a callable reconnect request or typed operator blocker for Codex when stop_required or restart_required; host owns transport so report-only tool with exact UI steps is the sanctioned path.
RELATED_PRS: #918
BLOCKERS: none for review
VALIDATION: pytest tests/test_issue_678_mcp_client_reconnect.py tests/test_mcp_restart_paths.py tests/test_issue_685_side_effect_free_resolver.py tests/test_issue_897_permission_stale_runtime_classification.py — 53 passed, 16 subtests passed
LAST_UPDATED_BY: jcwalker3 / prgs-author
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #918
issue: #678
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: prgs-reviewer-55686-63a824a5
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr918-678
phase: claimed
candidate_head:
29ad93d145target_branch: master
target_branch_sha:
2b4e43042alast_activity: 2026-07-25T23:13:03Z
expires_at: 2026-07-25T23:23:03Z
blocker: none
Formal review — PR #918 (head
29ad93d) · Closes #678Verdict: APPROVE
Scope
On-issue sanctioned MCP client reconnect request surface. 7 files, +853/−21. Single commit on master. Mergeable.
What is good
gitea_request_mcp_reconnect: reconnect_performed/mutation_performed always false; no kill/restart/reload.mcp_client_reconnect.pywith closed reason vocabulary, boundary classification, Codex/Claude/generic UI steps, forbidden-path hygiene.@mcp.tool().tests/test_issue_678_mcp_client_reconnect.py.Safety
Fails closed on read permission; forbids pkill/touch/config/.env/session-state recovery recommendations.
Validation
pytest tests/test_issue_678_mcp_client_reconnect.py → 16 passed. Worktree HEAD matches pin.
Canonical PR State
STATE: approved-awaiting-merge
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #918 at pinned head
29ad93d145when merge policy allowsNEXT_PROMPT:
WHAT_HAPPENED: Formal APPROVE submitted for PR #918 after code review and tests.
WHY: #678 acceptance met; report-only reconnect surface; no process management; scope clean.
ISSUE: #678
HEAD_SHA:
29ad93d145REVIEW_STATUS: approved / approval_at_current_head
MERGE_READY: true
BLOCKERS: none
VALIDATION: pytest tests/test_issue_678_mcp_client_reconnect.py → 16 passed; reviewer approved at head
29ad93d145NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; tool=gitea_submit_pr_review
LAST_UPDATED_BY: sysadmin / prgs-reviewer
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #918
issue: #678
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 35613-d9a629dab402
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr918-678
phase: claimed
candidate_head:
29ad93d145target_branch: master
target_branch_sha:
dc5d2c8caalast_activity: 2026-07-27T20:31:51Z
expires_at: 2026-07-27T20:41:51Z
blocker: none