Skip to content

feat(serve): server sessions get the default prompt and review guidance - #960

Merged
ajianaz merged 1 commit into
developfrom
feat/server-default-prompt
Nov 19, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/server-default-prompt

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Capability 1 of #945 (step 4 of #941): a session created by tole serve, tole acp or the MCP-over-HTTP host now gets the same default tool-discipline prompt and cora review guidance as the CLI, when no explicit prompt is set.

Why

Those sessions built their system prompt from a profile persona, TOLE_SYSTEM_PROMPT or a trusted config only, so with none of them the agent had no system prompt at all and behaved differently from tole chat in the same repository. This finishes #536 for the server faces.

Changes

  • session/assemble.rs: build_default_prompt_in(plan_mode, workspace) (the context line names the given workspace; build_default_prompt is unchanged for the CLI and delegates to the same code) and server_session_prompt(explicit, plan_mode, workspace, registry): an explicit prompt wins as --system does, else the shared default; the review section is appended only when both cora review tools are in the registry.
  • session/host.rs (open_session_with): a new session pins that prompt in its header, with the SESSION workspace in the context line (not the process cwd). A resumed session keeps its header-pinned prompt unless an explicit prompt applies (a profile chosen on resume still takes over, as before); a session created before this change has none pinned and does not gain one.
  • docs/faces.md: the (system prompt) row of the machine-checked table is gone; the default prompt and review guidance rows of the capability matrix are now shared. Skills, routing and MCP clients are unchanged.
  • tests/face_parity.rs: the prompt comparison is on the prompt text (modulo the context line), not on presence.
  • CHANGELOG: Behavior change under Unreleased / Changed.

Testing

  • New unit tests: a server session pins the CLI default prompt modulo the context line, and the line names the session workspace; plan-mode variant; explicit prompt wins; review section only with both tools; resume of an old-style session (no pinned prompt) adds none, and a pinned one is kept.
  • face_parity passes, and fails with (system prompt) differs between faces ... no row when a difference is reintroduced (checked with a temporary mutation, reverted). assemble_golden passes unchanged.
  • cargo fmt, clippy -D warnings in the default, --no-default-features and --no-default-features --features shell-tools profiles, and cargo test -p tole-cli in full.

A session from tole serve, tole acp or the MCP-over-HTTP host with no explicit
prompt now pins the shared default prompt (workspace in its context line, plan
mode sentence, review guidance when both cora review tools are present). Resume
keeps the header-pinned prompt. docs/faces.md and face_parity compare the text.

Refs #945, #941.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 2e2d2c0 into develop Nov 19, 2026
23 checks passed
@ajianaz
ajianaz deleted the feat/server-default-prompt branch November 20, 2026 08:37
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.

1 participant