Sashmark / Blog

Read repeated actions in agent plans

Bobby Huang ·

Find the words that take the plan back to an earlier action. Read a pass using the passage as it stands, then carry the changed wording into the return. Read the earlier action against that changed passage rather than the untouched opening. Follow the stated condition until it leads out of the repetition. Interpret the written plan without acting; its exit leaves the merits of repetition undecided.

Key takeaways

  • Return wording can make an earlier action apply again.
  • The passage entering a return includes the change just described.
  • An action repeated on changed text need not have the same effect.
  • The stated exit determines where this reading ends.

An action looks familiar, so you pass over it as something already read. Yet the sentence before it says to return. The familiar action now applies to text changed during the intervening passage. Skipping it as a duplicate would leave out part of what the plan says.

Imagine Jane Doe receiving a Markdown plan from an AI agent separate from her reader. This person and every passage here are invented. Its subject is shortening a phrase. Follow the imagined changes only as prose; leave the described activity untried. About the extension itself: why files end in .md. Here, attention stays on the return and the text it carries.

Find the words that bring the action back

Consider this invented plan passage:

Read the current passage. If it contains "very quiet", replace that phrase with "quiet" and return to reading the current passage. When "very quiet" is absent, leave this passage.

The return is written inside the sentence about replacement. "Return to reading the current passage" takes the reading back to the opening action. That opening action does not need to appear again lower on the page for the plan to repeat it.

Keep the return phrase beside the action it names in your interpretation. If you remember only "read" and "replace," the passage can sound like a single edit followed by an ending. Its actual wording brings the changed passage back under the opening instruction.

This distinction concerns what you read. Jane Doe is not making an edit here. She is following the described movement through an invented plan while leaving its words intact.

Follow a pass with the passage in view

The invented passage being discussed reads:

A very very quiet room.

The phrase "very quiet" appears near the end, immediately before "room." Read the replacement described by the plan at that place. The imagined change leaves:

A very quiet room.

The adjacent "very" remains. The plan names "very quiet" as the phrase to replace, so the imagined replacement does not also erase an adjoining word outside that phrase.

Read the next part of the plan sentence: return to reading the current passage. At this moment, "current passage" means "A very quiet room." Hold that wording in mind as you return. Bringing back "A very very quiet room" instead would discard the change the plan has just described.

The quotes are short prose passages. Ways Markdown code blocks enclose writing discusses another way of setting writing apart; these passages stay unfenced. Their relationship depends on which wording you carry into the return.

Bring the changed wording into the next pass

Read the opening action again with "A very quiet room" as the current passage. The familiar action has a changed passage before it. The phrase named in the condition is still present, so the replacement described there would leave:

A quiet room.

This imagined edit acts on the wording reached during the preceding pass. It does not begin afresh from the long phrase introduced above. The unchanged action and the changed passage belong together in your reading.

A mistaken retelling might say, "The plan keeps reading the original sentence and making the same edit." Return to the word "current." The plan does not say to put the original sentence back before reading. That retelling supplies an unwritten return of the text itself.

Another mistaken retelling could stop at "A very quiet room" because the replacement instruction has already been read. But the return sentence applies that earlier reading action again. Familiarity with the instruction does not remove its renewed application to the changed passage.

Keep your account concrete: the long phrase becomes the shorter phrase, and the return carries that shorter wording onward. Between replacement and return, retain only the actions the passage names.

Read the exit against what the return brings

With "A quiet room" in mind, return to the opening action again. The named phrase "very quiet" is absent. Now read the ending sentence:

When "very quiet" is absent, leave this passage.

That wording supplies the exit. Its condition applies to the passage reached after the imagined changes. The reading can leave the repetition there.

Reaching the end of the printed paragraph earlier would not have supplied this exit. The return phrase still directed attention backward. Equally, finding the exit sentence while the passage still held "very quiet" would not make its condition apply yet.

Read the condition and the current wording together. "A quiet room" still contains "quiet," but the exit names the longer phrase "very quiet." Treating every appearance of "quiet" as a reason to continue would change the condition being read.

Finding that exit says where the written repetition ends. Whether the shortening suits Jane Doe's purpose is outside this reading. Leave that judgment untouched.

Keep the return when describing the plan

Your account can say that the plan reads the current passage, replaces the named phrase when present, and brings the changed text back to the reading. It leaves the passage when the named phrase is absent. This retains both the backward movement and the way out.

For a separate Markdown file containing your interpretation, choosing a Markdown filename concerns its name. Within the interpretation, keep the imagined changed wording separate from the plan's own sentences. The words you followed through a pass are part of your account of the plan, without claiming that any action occurred.

If another passage contains a return but leaves its exit undescribed, keep that ending open. Do not borrow the exit from this invented example. Name the backward wording and the changed text it carries; an unwritten ending remains unwritten.

End here with the exit found in the example. The familiar action was read again because the plan brought it back, and the passage entering that action retained the preceding change.

Where Sashmark fits

Sashmark's desktop plans for v1 include Markdown reading alongside edits within the file. Work remains in development. AI is absent within Sashmark itself; the return remains yours to interpret.

Questions

Does returning mean reading the untouched passage again?
Read what the plan carries back. Here the return brings back the passage with its imagined edit intact. The untouched opening remains useful for comparison but does not replace that changed text.
Is repeated wording merely an accidental duplicate?
Look beside the familiar words for a stated return. A phrase that directs a return gives the earlier action another place in the reading, even if the action itself appears only once on the page.
Can a return lack an exit?
Describe the return you can find and leave its ending unstated. The passage needs to say how repetition ends; empty space beneath its final sentence supplies no exit.

What Sashmark plans for v1: Features · Roadmap

View as Markdown