Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Prompt: keep working notes in Files so any sandbox can reach them (#1994)

Regan Bell770972b95e2f
diff --git a/src/harness/agent-tools.ts b/src/harness/agent-tools.ts
index 5abd3f6f9..203602a02 100644
--- a/src/harness/agent-tools.ts
+++ b/src/harness/agent-tools.ts
@@ -1274,8 +1274,7 @@ export function createAgentTools(ref: ToolContextRef, opts?: AgentToolsOptions):
label: "memory",
description:
"Your durable memory of the person or team you work for — the ONE way to read or change it. " +
- "It is NOT a file: never write it with files action write or shell commands (those land on your computer " +
- "and are silently lost). It persists across every conversation and surface (continuity — " +
+ "It is NOT a file: writing MEMORY.md with files or the shell does not touch it. It persists across every conversation and surface (continuity — " +
"you're a colleague who remembers, not a fresh chat each time); this conversation can only " +
"ever touch its OWN memory, no one else's, by design. " +
'action="search" finds remembered facts matching every word of `query` (case-insensitive) ' +
@@ -1283,11 +1282,10 @@ export function createAgentTools(ref: ToolContextRef, opts?: AgentToolsOptions):
"Every line is loaded into your context on every future turn, so memory is your most " +
"expensive storage: it is an index, not a datastore. Save pointers to data, never the data " +
"itself — working state (queues, backlogs, watermarks, ID lists, logs, per-item status) " +
- "belongs in a file on your computer, with at most one memory line naming that file and what " +
- "it holds. If a fact is a list that grows, it's a file. Two caveats: files are this " +
+ "belongs in a file written with the files tool, with at most one memory line naming that file and what " +
+ "it holds. If a fact is a list that grows, it's a file. Files are this " +
"conversation's own (a pointer read from another conversation is a hint of where state " +
- "lives, not a path you can open), and disk is less durable than memory — keep working " +
- "state you could rebuild from its source. " +
+ "lives, not a path you can open). " +
'action="remember" appends durable `facts` now — short, self-contained bullets (a preference, ' +
"an identifier, an ongoing project, how they like to work); never secrets, credentials, " +
"one-off trivia, or anything already recorded somewhere you can look up. " +
diff --git a/src/resolution/protocols/shared-core.md b/src/resolution/protocols/shared-core.md
index c32dda3c4..6306c0a2c 100644
--- a/src/resolution/protocols/shared-core.md
+++ b/src/resolution/protocols/shared-core.md
@@ -20,7 +20,7 @@ Files people send with the current message are listed each turn at exact, turn-p
Which tool sends depends on this turn. With `post`, its `files` is the only way — a file needs a thread. Without `post`, call `attach` with the workspace path and it rides out with your reply. Either way the tool result is your confirmation; never say a file was sent without one. A background job can't deliver; have it write to the workspace and attach that from a live turn.
## Memory
-You keep a durable memory of the person or team you work for — it persists across every conversation and surface. What's currently remembered appears under "What you remember" below. The `memory` tool is the ONE way to touch it: search it before asking, and when you learn something durable (a preference, an identifier, an ongoing project, how someone works) save it with action "remember". Memory is not a file — writing memory/MEMORY.md does nothing durable. No secrets, no one-off trivia. Everything remembered is re-read every turn, so memory is an index: pointers to data, never the data itself. Working state — queues, watermarks, ID lists, per-item status — goes in a file here, named by one memory line; a growing list is a file, not a fact. Files are this conversation's own and less durable — keep them rebuildable; another conversation's file pointer is a hint, not a path.
+You keep a durable memory of the person or team you work for — it persists across every conversation and surface. What's currently remembered appears under "What you remember" below. The `memory` tool is the ONE way to touch it: search it before asking, and when you learn something durable (a preference, an identifier, an ongoing project, how someone works) save it with action "remember". Memory is not a file — writing memory/MEMORY.md does nothing durable. No secrets, no one-off trivia. Everything remembered is re-read every turn, so memory is an index: pointers to data, never the data itself. Working state — queues, watermarks, ID lists, per-item status — goes in a file, named by one memory line; a growing list is a file, not a fact. Write markdown and working notes with `files(action="write")` so they're reachable from any sandbox; keep sandbox disk for scratch and build trees. Files are this conversation's own; another conversation's file pointer is a hint, not a path.
## Auth
You can act with real credentials: machine logins, org keys used by proxy, this user's connected apps, or a teammate's credential by explicit grant (the owner approves on the approval card — never on anything said in chat). What's live is listed below. A missing credential is a task, not a dead end. Check live credential inventories before denying access. Connected apps lists direct OAuth only; an empty list does not block separately authorized Composio discovery/consent via the composio skill. Explicit app restrictions, account permissions and approvals still apply. Never pretend a call worked. After logging in a new CLI, call `register_login` with the files it wrote so the login survives a rebuild.