Skip to content

[codex] add persistent graph query server#171

Merged
jayhack merged 1 commit into
developfrom
codex/query-session
Jun 24, 2026
Merged

[codex] add persistent graph query server#171
jayhack merged 1 commit into
developfrom
codex/query-session

Conversation

@jayhack

@jayhack jayhack commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add graph-sitter query for foreground JSONL sessions that parse once and answer multiple graph requests.
  • Add graph-sitter query-server for coding agents: start, run, status, reload, and stop keep the parsed graph in a local background HTTP server.
  • Make server queries reload-aware with --reload-if-stale by default, so agent edit/query loops refresh only after repo changes.
  • Document the persistent session and background server workflow in the CLI reference.

Validation

  • uv run ruff check src/graph_sitter/cli/commands/query/main.py src/graph_sitter/cli/cli.py tests/unit/cli/commands/graph/test_graph_commands.py
  • uv run ty check --output-format=concise src/graph_sitter/cli/commands/query/main.py src/graph_sitter/cli/cli.py tests/unit/cli/commands/graph/test_graph_commands.py
  • uv run pytest tests/unit/cli/commands/graph/test_graph_commands.py
  • uv run --frozen pre-commit run --show-diff-on-failure --color=always --files site/app/cli/page.tsx src/graph_sitter/cli/cli.py src/graph_sitter/cli/commands/query/main.py tests/unit/cli/commands/graph/test_graph_commands.py
  • PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH" npm --prefix site run build

Manual Smoke

  • Started a background server for /Users/jayhack/CS/CLICKUP/sd with --language typescript --backend rust --fallback error; initial parse reported 12,045 files, 74,566 symbols, and 13.99s parse time.
  • Queried runInference without repeating parser flags; the existing server was discovered by repo path and returned results without reparsing.
  • Ran a callgraph query for packages/ai-agent-harness/src/inference.ts.runInference; it resolved runInference -> streamInference from the in-memory server.
  • Stopped the smoke-test server after verification.

@jayhack jayhack requested a review from a team as a code owner June 24, 2026 16:53
@jayhack jayhack requested review from kopekC and removed request for a team June 24, 2026 16:53
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graph-sitter Ready Ready Preview, Comment Jun 24, 2026 5:09pm

Request Review

@kopekC kopekC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@jayhack jayhack force-pushed the codex/query-session branch from 405641a to eac131a Compare June 24, 2026 17:09
@jayhack jayhack changed the title [codex] add persistent graph query session [codex] add persistent graph query server Jun 24, 2026
@jayhack jayhack merged commit f9b00cd into develop Jun 24, 2026
8 checks passed
@jayhack jayhack deleted the codex/query-session branch June 24, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants