← 제작기

합칠 사람을 기다리는 동안 밤 작업은 그 저장소를 건너뛰었다

Claude Navigator의 할 일 탭은 저장소마다 문서의 남은 일 절을 읽어 한 화면에 모읍니다. 10월 30일에 세어 보니 로컬 전용 저장소를 뺀 20곳에 165개가 있었습니다. 기기를 들고 봐야 하는 일, 제가 정해야 하는 일, Claude 가 이 맥 안에서 혼자 끝낼 수 있는 일이 한 목록에 섞여 있어서 맡길 것을 고르는 일부터 제 몫이었습니다.

그날 새벽에 밤 작업을 붙였습니다. 화요일부터 토요일까지 새벽 2시에 예약 회차가 돌고, 맡길 수 있는 일 하나를 그 저장소의 별도 작업 사본(worktree)에서 처리해 night/ 브랜치로 남깁니다. 하룻밤에 하나이고, 40분을 넘으면 그 자리에서 멈춥니다. 같은 날 낮에 두 군데를 고쳤는데, 둘 다 사람을 기다리는 자리였습니다.

고르는 일을 어느 모델에 맡길지 쟀다

목록은 다섯 갈래로 나눕니다. 확인, 결정, 바깥, 기다림, 맡김입니다. 둘에 걸치면 사람이 먼저 해야 하는 쪽을 고릅니다. 같은 165개를 Claude 와 로컬 gemma4:12b 로 각각 분류했더니 112개(68%)가 같았습니다. 갈린 곳이 문제였습니다. gemma 가 맡김으로 고른 35개 가운데 19개는 Claude 가 큰 기능이나 바깥 계정이 필요한 일로 본 것이었습니다.

밤에 혼자 도는 일에는 틀린 맡김이 가장 위험합니다. 사람이 직접 봐야 끝나는 일을 맡김으로 잘못 고르면, 고친 것이 맞는지 아무도 모르는 채로 아침을 맞습니다. 분류는 Claude 로 하기로 하고, 결과를 항목 해시로 쌓아 새 항목만 묻게 했습니다. 처음 165개에 2분 49초와 하위 에이전트 토큰 약 20만이 들었고, 첫 회차에서 새로 물은 것은 9개였습니다.

일꾼은 웹을 읽지 않고, 검토자는 읽기만 한다

역할은 셋입니다. 예약 회차가 부르는 쪽으로서 고르고 정리하고, 일꾼과 검토자는 하위 에이전트로 따로 돕니다. 일꾼에게는 셸과 파일 읽기·쓰기만, 검토자에게는 파일 읽기와 찾기만 줬고 둘 다 웹 도구가 없습니다. 밤 작업이 읽는 것이 이 맥의 저장소뿐이면 남이 쓴 글에 숨은 지시가 들어올 길이 없습니다. 그 길은 판단으로 막지 않고 도구를 빼서 끊었습니다. 일꾼에게 넘기는 항목 글도 Navigator 가 주소와 키 꼴을 이미 가린 것입니다. 그 가림이 생긴 사정은 내 기록을 모으니 개인 정보도 같이 모였다에 있습니다.

검토자에게는 일꾼의 요약을 넘기지 않고 diff 만 줍니다. 예약 없이 손으로 한 바퀴 돌린 시험에서 이 결정이 효과를 봤습니다. 일꾼이 만든 문서 검사기는 일꾼 자신의 시험을 모두 통과했지만, diff 만 읽은 검토자가 설명 문단 속 인용 때문에 생기는 헛통과를 짚었고 부르는 쪽이 사본에서 재현했습니다. 그 경위는 검사기는 설명 문단의 인용을 보고 통과했다에 따로 적었습니다. 항목 하나에 약 5분 50초와 하위 에이전트 토큰 약 64만이 들었고, 돌려보내기가 없었다면 약 3분 40초와 30만입니다.

합칠 사람을 기다리는 동안 그 저장소는 빠졌다

첫 예약 회차는 10월 30일 2시 14분에 시작해 약 4분 만에 끝났습니다. 한 저장소의 남은 일 절에 끝난 기록이 남아 있던 것을 검증 상태 절로 옮기는 문서 정리였고, 검토는 merge 였습니다. 두 에이전트 정의가 그대로 실렸고, 기록에서 쓴 도구를 세어 보니 일꾼은 셸·편집·읽기, 검토자는 읽기·찾기뿐이었습니다. 일꾼이 지운 28줄이 새 문서에 모두 있는지 따로 대 봤고, 빠진 줄은 0이었습니다.

처음 규칙은 합치는 것을 제가 말할 때만 하게 했습니다. 고르는 규칙은 검토 전인 지난 밤 것 위에 또 손대지 않으려고 night/ 브랜치가 남은 저장소를 건너뛰는데, 같은 밤 빌딩 원본 저장소가 시험 때 남은 브랜치 때문에 이 규칙에 걸려 빠졌습니다. 제가 합치지 않는 한 그 저장소는 밤 작업에서 계속 빠집니다. 그 자리에서 "내가 안 봐도 할 수 있게 자동으로" 하자고 정했습니다.

합쳐도 되는지는 검토자가 정하고, 합치는 명령은 합칠 수 있는 상태인지만 봅니다. 제가 그 저장소의 main 에서 일하는 중이거나, 작업 사본에 커밋 안 한 변경이 있거나, 지우거나 옮긴 파일이 있거나, 검사기가 실패하거나, 밤사이 main 이 움직여 앞으로 감기가 안 되면 아무것도 바꾸지 않고 브랜치를 남깁니다. LaunchAgent 가 저장소 폴더의 코드를 바로 돌리는 곳은 합치는 것이 곧 배포라서 문서만 바뀐 것만 합칩니다. 10월 30일에 그런 저장소가 여섯이었고, 목록을 적어 두지 않고 매번 plist 를 읽어 정합니다. 임시 저장소 아홉 경우로 시험하니 합칠 셋은 main 이 앞으로 가고 작업 사본과 브랜치가 지워졌으며, 거절할 여섯은 HEAD 와 브랜치, 작업 폴더가 그대로였습니다. 합친 것은 git revert 로 되돌리는 명령과 함께 아침 보고에 남습니다.

실제 저장소에서 저절로 합친 첫 회차는 10월 31일 새벽이었습니다. 02:14에 시작해 02:20에 끝났고, 새로 분류한 14개 가운데 맡길 일은 없었지만 앞서 맡김으로 골라 둔 항목 하나를 처리했습니다. 한 실험 스크립트가 넷 가운데 하나만 그림 없이 끝나 실패처럼 보이던 일입니다. 첫 검토는 "고침" 판정이었습니다. 같은 커밋 안에서 문서의 실험 수와 명령 목록이 새로 쓴 함정 줄과 어긋난다는 지적이었고, 부르는 쪽이 문서와 코드를 찾아 재현했습니다. 한 번 돌려보낸 뒤 두 번째 검토가 통과해 main 에 앞으로 감기로 합쳐졌고, 되돌릴 명령도 결과 기록에 함께 남았습니다. 끝난 뒤에는 night/ 브랜치도 작업 사본도 남지 않아 알림은 보내지 않았습니다. 일꾼은 2분 37초, 검토는 두 번에 1분 17초가 들었습니다. 커밋 안 한 변경이 있던 저장소 하나는 건너뛰었습니다.

할 일 탭에만 띄우면 그 창에서는 못 본다

저절로 합치게 된 뒤로 브랜치가 남는 것은 세 경우입니다. 합치는 명령이 거절했거나, 두 번째 검토도 fix 이거나, 40분에 걸려 멈춘 경우입니다. 순찰이 이런 브랜치를 할 일 탭에 띄우지만, 그 저장소의 대화창에서 일하는 동안에는 탭을 열지 않으면 보이지 않습니다. 이 빈자리를 보고 제가 "각 저장소 대화창에도 올려줘. 그거 보고 판단을 하게"라고 했습니다.

받을 창은 Navigator 가 그 저장소를 맡았다고 보는 세션 가운데서 고릅니다. 처음 그대로 두니 한 저장소는 밤 작업 회차 자신이, 다른 저장소는 카드를 쓰려고 잠깐 들렀던 사이트 세션이 골라졌습니다. 예약 회차와 들르기만 한 세션을 빼고, 맡은 세션이 없으면 Navigator 저장소의 세션으로 보냅니다. 알림은 정해진 틀만 씁니다. 못 합친 까닭과 검토 지적, 브랜치, 합치기와 버리기 명령을 담고, 받는 창의 Claude 는 도구를 쓰지 말고 옮겨 보여 주기만 하며 합치거나 버리는 것은 제가 그 창에서 말할 때만 한다고 적었습니다. 메시지를 보내지 않는다는 밤 작업의 규칙에 이 하나만 예외로 넣었습니다.

제가 허락해 Claude 가 시험 알림 하나를 한 저장소의 대화창으로 보냈습니다. 시험이라고 밝히고 브랜치는 예시로 넣었습니다. 결과는 delivered 였고, 받은 창은 도구를 쓰지 않고 세 줄로 옮겨 적은 뒤 합치기와 버리기는 하지 않았다고 덧붙였습니다. 예약 회차에서 보내는 것은 아직 확인하지 못했습니다. 무인 회차에서는 자동 모드의 검토기가 이 호출을 막을 수도 있습니다. 그런 실패가 소리 없이 지나가는 모양은 무인 작업은 멈추거나, 조용히 빠졌다에 적었습니다.

순찰과 회고도 같은 날 붙였다

밤 작업 곁에 둘을 더 붙였습니다. 순찰은 Navigator 가 15분마다 목록을 다시 만들 때 저장소마다 문서 단언 검사기를 돌리고, main 이 아닌 브랜치와 안 합친 브랜치, 이틀 넘게 커밋하지 않은 변경을 셉니다. 그 전까지 검사기는 코드를 고친 세션이 기억할 때만 돌았습니다. 16곳을 다 돌리는 데 3.5초였고, 빠른 빌드는 5.0초에서 5.6~6.1초가 됐습니다. 걸리는 경우를 일부러 만들어 보니 main 이 없는 임시 저장소가 "main 아닌 브랜치"에 걸리지 않았습니다. 그 저장소의 브랜치를 기준으로 잡은 탓이어서, main 도 master 도 없으면 main 을 기준으로 보게 고쳤습니다.

주간 회고는 지난 7일의 제 질문과 도구 실패, 영어로 샌 답을 세어 규칙 후보를 냅니다. 되풀이되는 요청을 세는 일이 10월 8일에 손으로 한 번 세고 끝나 있었습니다. 첫 회에 회고 쪽이 수를 다시 세다 둘을 짚었고, 둘 다 맞았습니다. '시간 초과' 76건은 읽은 파일 내용에 걸린 헛집계여서 2건으로 줄었고, 질문 446개 가운데 44개는 대화 압축 요약이었습니다. 이를 고치다 하나를 더 밟았습니다. 실패 표시가 있을 때만 세게 하자 셸의 별표 오류가 52건에서 8건으로 숨었는데, 명령을 이어 붙이면 마지막 명령이 성공하는 순간 실패 표시 없이 끝나기 때문이었습니다. 셸이 찍는 오류 꼴은 표시와 상관없이 세게 했습니다. 후보 다섯을 규칙에 넣을지는 제가 정합니다.

정리하면

  • 밤에 혼자 도는 일에서 가장 위험한 것은 틀린 맡김입니다. 고르는 모델은 맡김을 얼마나 넓게 잡는지를 보고 골랐습니다.
  • 숨은 지시는 판단으로 막지 않고 도구를 빼서 끊습니다. 일꾼은 웹을 읽지 않고, 검토자는 읽기만 합니다.
  • 검토자에게는 일꾼의 요약 대신 diff 를 줍니다. 읽기만 하는 검토자의 지적은 추론이라, 부르는 쪽이 사본에서 재현한 뒤 돌려보냅니다.
  • 사람이 합치기를 기다리는 동안 그 저장소는 밤 작업에서 빠졌습니다. 합쳐도 되는지와 합칠 수 있는지를 나눠, 뒤쪽만 코드가 봅니다.
  • 알림은 그 저장소에서 일하는 창으로 보냅니다. 받는 쪽은 옮겨 적기만 하고, 정하는 것은 사람입니다.

The to-do tab in Claude Navigator reads the remaining-work section (남은 일) of each repository's document and gathers them on one screen. When I counted on October 30, there were 165 items across 20 repositories, not counting local-only ones. Work that needs me to pick up a device, work I have to decide, and work Claude can finish alone on this Mac were mixed into one list, so even picking out what to hand off was my job.

Early that morning I added a night run. A scheduled run fires at 2 a.m. from Tuesday to Saturday, handles one task that can be handed off in a separate working copy (worktree) of that repository, and leaves it on a night/ branch. It takes one task per night, and if it goes past 40 minutes it stops right there. Later that same day I fixed two places, and both were spots where it was waiting for a person.

Measuring which model should do the picking

The list is split five ways: check, decide, outside, waiting and hand-off. When an item straddles two, the one a person has to do first is chosen. I classified the same 165 items with Claude and with the local gemma4:12b, and 112 (68%) matched. The trouble was where they split. Of the 35 that gemma picked as hand-off, 19 were ones Claude saw as large features or work that needs an outside account.

For work that runs alone at night, a wrong hand-off is the most dangerous. If work that is only finished once a person looks at it directly is wrongly picked as hand-off, morning comes with nobody knowing whether the fix is right. I decided to classify with Claude, and stored the results by item hash so that only new items are asked about. The first 165 took 2 minutes 49 seconds and about 200,000 subagent tokens, and the first run asked about only 9 new items.

The worker does not read the web, and the reviewer only reads

There are three roles. The scheduled run, as the caller, picks and tidies up, while the worker and the reviewer run separately as subagents. The worker was given only the shell and reading and writing files, the reviewer only reading and searching files, and neither has web tools. If all the night run reads is the repositories on this Mac, there is no way in for instructions hidden in text someone else wrote. I did not block that way in with judgement; I cut it by taking the tools away. The item text handed to the worker has also already had addresses and key-shaped strings redacted by Navigator. How that redaction came about is in Gathering My Records Gathered Personal Information Too.

The reviewer is not handed the worker's summary, only the diff. This decision paid off in a trial I ran once by hand, without the schedule. The document checker the worker built passed all of the worker's own tests, but the reviewer, reading only the diff, pointed out a false pass caused by a quote inside an explanatory paragraph, and the caller reproduced it on a copy. That story is written up separately in A Quote Made the Checker Pass. One item took about 5 minutes 50 seconds and about 640,000 subagent tokens; without the send-back it would have been about 3 minutes 40 seconds and 300,000.

While waiting for someone to merge, that repository dropped out

The first scheduled run started at 2:14 on October 30 and finished in about 4 minutes. It was a documentation tidy-up that moved completion records left in one repository's remaining-work section into its verification-status section, and the reviewer's verdict was "merge". Both agent definitions were loaded as written, and counting the tools used in the logs, the worker used only shell, edit and read, and the reviewer only read and search. I separately checked that all 28 lines the worker deleted were in the new document, and 0 were missing.

The first rules had merging happen only when I said so. To avoid touching anything on top of the previous night's unreviewed work, the picking rule skips repositories that still have a night/ branch, and that same night the source repository for Claude Building was caught by this rule and skipped because of a branch left over from the trial. As long as I do not merge, that repository keeps dropping out of the night run. Right then I decided to make it "automatic, so it can be done without me looking".

Whether a branch may be merged is decided by the reviewer; the merge command only checks whether it can be merged. If I am working on that repository's main, if the working copy has uncommitted changes, if files were deleted or moved, if the checker fails, or if main moved overnight so a fast-forward is not possible, it changes nothing and leaves the branch. Where a LaunchAgent runs code straight from the repository folder, merging is the same as deploying, so only documentation-only changes are merged there. On October 30 there were six such repositories, and rather than keeping a written list, it reads the plists each time to decide. In a test with nine cases on temporary repositories, the three that should merge had main move forward and their working copy and branch deleted, and the six that should be refused kept HEAD, branch and working folder as they were. What gets merged is left in the morning report together with a git revert command to undo it.

The first run that merged on its own in a real repository was in the early hours of October 31. It started at 02:14 and ended at 02:20; none of the 14 newly classified items was hand-off, but it handled one item picked as hand-off earlier. It was a case where an experiment script finished one run out of four without a figure, so it looked like a failure. The first review's verdict was "fix". It pointed out that within the same commit, the document's experiment count and command list disagreed with the newly written pitfall line, and the caller searched the document and code and reproduced it. After one send-back the second review passed, and it was merged into main by fast-forward, with the undo command left in the result record as well. Afterwards neither a night/ branch nor a working copy remained, so no notification was sent. The worker took 2 minutes 37 seconds, and the two reviews took 1 minute 17 seconds. One repository with uncommitted changes was skipped.

Shown only on the to-do tab, it cannot be seen from that window

Since merging became automatic, a branch is left behind in three cases: the merge command refused, the second review also returned "fix", or it stopped at the 40-minute limit. The patrol shows such branches on the to-do tab, but while I am working in that repository's chat window, I do not see them unless I open the tab. Seeing this gap, I said, "Post it to each repository's chat window too, so I can look at it and decide."

The receiving window is chosen from the sessions Navigator sees as owning that repository. Left as it was at first, for one repository it chose the night-run session itself, and for another a site session that had only dropped by briefly to write a card. I excluded scheduled runs and sessions that only visited, and when there is no owning session, it sends to the Navigator repository's session. The notification uses only a fixed template. It carries why it could not merge, the review's findings, the branch, and the commands to merge and to discard, and it states that the Claude in the receiving window should use no tools and only relay it, and should merge or discard only when I say so in that window. This is the one exception added to the night run's rule against sending messages.

With my go-ahead, Claude sent one test notification to one repository's chat window. It said it was a test, and the branch in it was an example. The send status came back "delivered", and the receiving window, using no tools, copied it out in three lines and added that it had neither merged nor discarded anything. Sending from a scheduled run is not confirmed yet. In an unattended run, auto mode's reviewer may block this call. How that kind of failure goes by silently is in Unattended Runs Stalled, or Quietly Skipped.

The patrol and the retrospective went in the same day

Two more went in beside the night run. The patrol, when Navigator rebuilds the list every 15 minutes, runs each repository's document-assertion checker and counts branches other than main, unmerged branches, and changes left uncommitted for more than two days. Until then the checker ran only when the session that changed the code remembered to run it. Running it across all 16 repositories took 3.5 seconds, and the fast build went from 5.0 seconds to 5.6–6.1 seconds. When I deliberately made cases that should trip it, a temporary repository with no main was not caught as "a branch other than main". It had taken that repository's own branch as the baseline, so I fixed it to use main as the baseline when there is neither main nor master.

The weekly retrospective counts my questions, tool failures and replies that slipped into English over the past 7 days and proposes rule candidates. Counting recurring requests had been done once by hand on October 8 and left at that. In the first round, the retrospective side recounted the numbers and flagged two things, and both were right. The 76 "timeouts" were a false count triggered by the content of files that had been read, and dropped to 2, and 44 of the 446 questions were conversation-compaction summaries. While fixing this I stepped on one more. When I made it count only calls with a failure flag, the shell's wildcard errors were hidden, falling from 52 to 8, because when commands are chained, the moment the last one succeeds the call ends without a failure flag. I made it count the error shapes the shell prints regardless of the flag. Whether the five candidates go into the rules is mine to decide.

In short

  • For work that runs alone at night, the most dangerous thing is a wrong hand-off. I chose the picking model by how broadly it interprets "hand-off".
  • Hidden instructions are not blocked with judgement but cut off by taking the tools away. The worker does not read the web, and the reviewer only reads.
  • The reviewer gets the diff instead of the worker's summary. A read-only reviewer's finding is inference, so the caller reproduces it on a copy before sending the work back.
  • While waiting for a person to merge, that repository dropped out of the night run. Whether it may be merged and whether it can be merged are split, and code looks only at the second.
  • Notifications go to the window working in that repository. The receiving side only relays them, and a person decides.