# MongoDB 8.0 direct connection to shard improper sharded cluster error use mongos backup tool shard direct command

Status: search-observed
Product: MongoDB 8.0
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/mongodb-8-0-direct-connection-to-shard-improper-sharded-cluster-error-use-mongos-backup-tool-sha
Machine JSON: https://gitdocs.org/api/fixes/mongodb-8-0-direct-connection-to-shard-improper-sharded-cluster-error-use-mongos-backup-tool-sha.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The local schema/query is valid, but upgrade path, restart behavior, replication syntax, or background operations changed in the server release.

## Fix

```
Verifier checks durability, restart, and operational safety rather than a one-shot query. Check durability, topology-safe routing, and monitoring meaning.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- MongoDB 8.0 direct connection to shard improper sharded cluster error use mongos backup tool shard direct command
- site:mongodb.com/docs/manual MongoDB 8.0 connect directly to shard mongos
- MongoDB sharded cluster do not connect directly to shard mongos documentation
- https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/
- 'Applications never connect or communicate directly with the shards.' in https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/

## Sources

- MongoDB 8.0 compatibility changes: https://www.mongodb.com/docs/manual/release-notes/8.0-compatibility/
- Official reference opened by Codex: https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/
