skip to content

4 min read

Lost my bearings: a progress bar for Claude Code’s goal

In a long session the goal gets buried in the context, for Claude and for me. I built a mod that pins the goal above the prompt and fills a bar as steps get done.

  • claude code
  • mods
  • productivity

I start the session with a clear goal: migrate login to the new session provider.

Two hours later, Claude is fixing a flaky test in another module, which broke because of a dependency, which had to be bumped because of a type, which showed up in the middle of the migration. Every step made sense. The whole thing ended up somewhere else.

And worse: I forgot too. I was approving each step, finding it all reasonable, without noticing the migration itself had been stalled for an hour.

I call it the black hole. Nothing pulls you off the goal in one go. It’s one step at a time, and the goal drifts further back, buried at the start of the conversation.

Why it happens

The goal shows up once, in the first message. Then come hundreds of file reads, test output and diffs. For the model, that first sentence becomes an ever-smaller slice of the context. When the session is compacted, it becomes one line in the summary.

Same for me. I read the last step, not the first. Nobody in the session is watching the scoreboard.

What nobody measures disappears. Including the goal.

The idea: a bar that fills

What if the goal were always visible, with a bar that only fills when real work moves forward? That’s what I built: a Claude Code mod called norte (Portuguese for north, as in losing your bearings).

10 min

◎ norte: migrate login to the new session provider

█████████░░░░░░░░░░░░░░░░░░░░░ 29% · 2/7 · next: swap the session middleware

> ask anything

2 h

◎ norte: migrate login to the new session provider

██████████░░░░░░░░░░░░░░░░░░░░ 33% · 3/9 · next: swap the session middleware

⚠ 4 turns without finishing a step · +2 steps since the plan

> ask anything

3 h

◎ norte: migrate login to the new session provider

██████████████████████████████ 100% · 9/9 ✓ done

> ask anything

How it works:

  1. I set the goal: /norte migrate login to the new session provider.
  2. Claude breaks it into 3 to 8 checkable steps, through a tool the mod registers.
  3. The bar fills with each step done, above the prompt, with the next step beside it.
  4. Every message I send carries a reminder of the goal and the next step. And Claude is told to say, in one line, when what I’m asking doesn’t serve the goal.
  5. Drift turns yellow. Three turns in a row without closing a step and the bar warns.
  6. Growing scope shows up. If Claude finds new work, it becomes a new step, and the bar shows +2 steps since the plan. The percentage drops. The black hole becomes visible.

The second frame above is what I wanted to see two hours before noticing on my own: 33%, four turns without progress and the plan growing.

The decisions that matter

The percentage comes from finished steps, not a guess. Ask “how much is left?” and the model says “about 70%” with full confidence. The bar is steps done / total steps. You can disagree with a step; you can’t argue with a made-up number.

I own the goal. Claude can change the steps (check, add, reorder), but not the goal. If the goal changed, I run /norte again.

The reminder rides with the message, not the system prompt. Putting the goal in the system prompt would be the obvious move. But the system prompt sits at the very start, and changing anything there invalidates the whole conversation’s cache on every progress update. As I wrote in Swapping the model didn’t lower my Claude Code bill. This did., cache is most of the bill. The reminder goes as context attached to the message: three lines, and the cache stays intact.

Subagents don’t count. Only main-conversation turns count toward drift. An agent running in parallel shouldn’t make the bar flicker.

What it looks like inside

Claude Code has a mod API: a TypeScript module that hooks into session events. The whole mod is about 200 lines. The two core pieces:

The reminder, on every message I send:

on('prompt.submit', async ($, e, next) => {
  const n = await read($, atual)
  if (!n || e.command || e.isMeta) return next(e)

  return next({ ...e, context: [...(e.context ?? []), lembrete(n)] })
})

The bar, drawn above the prompt:

on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
  const n = await read($, atual)
  if (!n || e.props.hasSurvey) return next(e)

  const { Box, Text } = $.ui.resolve(e)
  return (
    <Box flexDirection="column">
      <Text bold wrap="truncate-end">{`◎ norte: ${n.objetivo}`}</Text>
      <Text color={concluido(n) ? 'success' : 'claude'}>
        {`${barra(pct(n), 30)} ${pct(n)}% · ${detalhe(n)}`}
      </Text>
    </Box>
  )
})

The rest is the progresso tool, which Claude calls with the list of steps, and the count of turns without progress at the end of each turn. State lives in the session and survives reloading the mod.

Install

The code is at github.com/CristianFreitas/norte. At the Claude Code prompt:

/plugin install norte --marketplace CristianFreitas/norte

Answer y to add the marketplace, pick a scope, and you’re set. Then /norte <your goal>.

The limits

  • It depends on Claude calling the tool. It does, because the reminder asks on every message. If it forgets, the bar stalls, and then the drift warning lights up, which is information too.
  • A step isn’t effort. One step can take ten minutes and the next one two hours. The bar measures progress through the plan, not time left.
  • The mod API is still early access. It may change between Claude Code versions.

The bar doesn’t make Claude smarter. It just puts the goal where we both look all the time, and makes drift show up while there’s still time to turn back.

Before asking “what’s left?”, check your north.