Skip to content

The agent that grows with you

refactor(agent/G_small): rewrap adjacent string-literal fragments (bytes identical, parity corpus)

Tekniumc1ae5349baaf
diff --git a/agent/review_engine.py b/agent/review_engine.py
index 5e8430901ac..dd2dddf8b8f 100644
--- a/agent/review_engine.py
+++ b/agent/review_engine.py
@@ -34,8 +34,7 @@ _REVIEW_GOAL = (
"from the excerpt alone. Produce a full, structured review: what "
"the work does, whether it is correct and complete, concrete "
"defects or risks found (with file/line references where possible), "
- "what was verified vs. only read, and a clear final verdict with "
- "recommended next steps."
+ "what was verified vs. only read, and a clear final verdict with recommended next steps."
)
@@ -232,8 +231,7 @@ def format_dispatch_note(result: Dict[str, Any], user_prompt: str = "") -> str:
return (
f"⚖ Review subagent dispatched{model_note}{focus_note} — it is "
f"investigating the last {DEFAULT_CONTEXT_MESSAGES} messages in "
- f"the background and its full review will re-enter this "
- f"conversation when it finishes."
+ f"the background and its full review will re-enter this conversation when it finishes."
)
# Synchronous fallback (channels that cannot route async completions).
return (
diff --git a/agent/side_question.py b/agent/side_question.py
index 5a6c890fbe2..6dd54eb4d2d 100644
--- a/agent/side_question.py
+++ b/agent/side_question.py
@@ -26,29 +26,21 @@ _PER_MESSAGE_CHAR_CAP = 2000
_TRANSCRIPT_CHAR_BUDGET = 24000
_FORK_PROMPT = (
- "The user asked a quick SIDE question with /btw while the main work "
- "continues in the original session.\n"
- "Rules:\n"
+ "The user asked a quick SIDE question with /btw while the main work continues in the original session.\nRules:\n"
"- Answer ONLY the side question, using the conversation above as "
"context. Do not continue, redo, or critique the main task.\n"
- "- Do NOT call any tools — they are disabled for this side question. "
- "Answer directly in text.\n"
- "- If the conversation does not contain enough information to answer, "
- "say so plainly instead of guessing.\n"
+ "- Do NOT call any tools — they are disabled for this side question. Answer directly in text.\n"
+ "- If the conversation does not contain enough information to answer, say so plainly instead of guessing.\n"
"- Be concise and direct."
)
_ONESHOT_INSTRUCTIONS = (
"You are the same AI assistant that is currently working inside the "
"conversation transcribed below. The user has asked a quick SIDE question "
- "with /btw while the main work continues.\n"
- "Rules:\n"
- "- Answer ONLY the side question. Do not continue, redo, or critique the "
- "main task.\n"
- "- Use the transcript as your primary context; it is a snapshot and may "
- "not include the very latest activity.\n"
- "- If the transcript does not contain enough information to answer, say "
- "so plainly instead of guessing.\n"
+ "with /btw while the main work continues.\nRules:\n"
+ "- Answer ONLY the side question. Do not continue, redo, or critique the main task.\n"
+ "- Use the transcript as your primary context; it is a snapshot and may not include the very latest activity.\n"
+ "- If the transcript does not contain enough information to answer, say so plainly instead of guessing.\n"
"- Be concise and direct."
)
@@ -138,8 +130,7 @@ def _answer_via_fork(parent_agent: Any, question: str, history: Optional[List[Di
set(),
deny_msg_fmt=(
"Side question (/btw) denied tool call: {tool_name}. "
- "Tools are disabled here — answer directly from the "
- "conversation context."
+ "Tools are disabled here — answer directly from the conversation context."
),
)
snapshot = trim_snapshot_for_fork(history)
diff --git a/agent/ssl_guard.py b/agent/ssl_guard.py
index b27ef5eceec..36702f8f719 100644
--- a/agent/ssl_guard.py
+++ b/agent/ssl_guard.py
@@ -17,8 +17,7 @@ _CA_BUNDLE_ENV_VARS = ("HERMES_CA_BUNDLE", "SSL_CERT_FILE", "REQUESTS_CA_BUNDLE"
_REPAIR_HINT = (
"Repair: run `hermes doctor --fix` (auto-reinstalls certifi), or "
"manually: python -m pip install --force-reinstall certifi openai httpx\n"
- "If you configured a custom corporate CA bundle, fix or unset the "
- "broken CA bundle environment variable."
+ "If you configured a custom corporate CA bundle, fix or unset the broken CA bundle environment variable."
)
diff --git a/agent/thinking_timeout_guidance.py b/agent/thinking_timeout_guidance.py
index 8a6f20c78fe..4df59cade2e 100644
--- a/agent/thinking_timeout_guidance.py
+++ b/agent/thinking_timeout_guidance.py
@@ -45,15 +45,11 @@ def build_thinking_timeout_guidance(
"\n\nThe model's thinking phase exceeded the upstream proxy's "
"idle timeout before the first content token arrived. This is a "
f"known issue with reasoning models (like {label}) behind cloud "
- "gateways (NVIDIA NIM, OpenAI, Anthropic, DeepSeek). Workarounds "
- "in priority order:\n"
+ "gateways (NVIDIA NIM, OpenAI, Anthropic, DeepSeek). Workarounds in priority order:\n"
f"1. Set `providers.{provider}.models.{model}.stale_timeout_seconds: 900` "
"in `~/.hermes/config.yaml` to extend the per-call timeout. "
"(Hermes's built-in floor is 600s for known reasoning models — "
- "if you still see this after raising, the upstream cap is even "
- "shorter.)\n"
- "2. Lower `reasoning_budget` or set `reasoning_effort: medium` on this "
- "model if the provider supports it.\n"
- "3. Use a smaller / faster reasoning model if the task doesn't "
- "require deep thinking."
+ "if you still see this after raising, the upstream cap is even shorter.)\n"
+ "2. Lower `reasoning_budget` or set `reasoning_effort: medium` on this model if the provider supports it.\n"
+ "3. Use a smaller / faster reasoning model if the task doesn't require deep thinking."
)