Repository navigation
[NO-JIRA] Deliver subdirectory hints in tool responses instead of the system prompt (R20) - #29
Merged
Conversation
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 06:16
a4af789 to
99508ed
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 06:56
99508ed to
a1f1974
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 07:46
a1f1974 to
ca3dffd
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 08:56
ca3dffd to
cab065c
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 10:16
cab065c to
430db25
Compare
johnnymo87
added a commit
that referenced
this pull request
Nov 22, 2026
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 11:37
430db25 to
d836275
Compare
… system prompt (R20) v1.60.2 folds subdirectory hints into the system prompt, rebuilt each turn from the agent-visible tool requests. The prompt changes whenever a new directory is touched, or when compaction drops the call that found one, and each change invalidates the provider's prompt cache from the system prompt on. Hints now go once into the last successful tool result of the batch that needs them, as an assistant-only text block in the 1.54 format (lead-in plus a <subdirectory-hints dir="..."> marker), so sessions migrated from 1.54 do not get them twice. Delivery is a pure function of the stored conversation, with no in-memory state to requeue: directories come from agent-visible tool requests, as upstream's did, and a hint counts as delivered while its hint block is in an agent-visible tool result (a marker quoted elsewhere does not count). After compaction a hint returns with the first call into its directory; truncation (honk /undo) removes the block with the calls that found the directory. X-Shepherd-Wake: #29
johnnymo87
force-pushed
the
r20-subdir-hints-in-conversation
branch
from
November 22, 2026 11:49
d836275 to
ed3dce9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Port of fork #13 onto v1.60.2 (R20, bead workstation-6w7i.26.4.7). Subdirectory hints no longer change the system prompt, so touching a new directory no longer invalidates the prompt cache.
Repository instructions … <subdirectory-hints dir="…">). Sessions already carrying 1.54 markers do not get them a second time./undo(R21) removes the block together with the calls that found the directory.state_machine/subdirectory_hints.rs. The upstream files only routeToolExecution::runthrough it and drop hints fromprompt_parts.prompt_and_skill_lifecycle, which now asserts the hint is not in the system prompt and appears exactly once in the input across two turns. All of them are inpatched-test.yml.Known and unchanged from 1.54: PostToolUse hooks and chat-history search now see hint text, because it lives in tool results. The context report's "Subdirectory hints" category under additional instructions no longer fills; those tokens count as tool output.
Merge order (bead workstation-6w7i.26.4): after R21, R11 and R12.
References